First create a duplicate folder for your archive based on your orig structure (with no files).
For me /data/all_photos is where the big originals are, and i want copy put in /data/small
Code:
cd /data/all_photos
rsync -av -f"+ */" -f"- *" . /data/small
then, put this is a nice bash script (called rgm) in location say /data
{replace *123*.JPG with * or whatever you want}
Code:
while read file
do
oufile="${file:2}"
convert -monitor -resize 1024x1024 "$file" "/data/small/${oufile}"
done < <(find . -name \*123*.JPG)
then
just run your command with
{make sure your pwd is your photo root folder - for me /data/all_photos}
if you need convert, then get it using
Code:
sudo apt-get install imagemagick --fix-missing