Simply mirror folder A->B resizing the JPGs smaller? - RealWorld forums

Log-in or register.

Simply mirror folder A->B resizing the JPGs smaller?

NeilF
on August 8th 2014

I simply want to resize all the jpg images in folder A (& its subfolders) into folder B (down to 1080p size, don't modify otherwise).

This should be done as a mirror exercise so:-
1) Only modified jpgs needs be converted. ie: The 10,000 already done don't need re-doing.
2) If folders/images have been deleted from A, they should likewise be removed from B.

Any idea if this is possible?

Thanks!

NeilF
on August 8th 2014

I've managed to get a long way there...

This creates my mirror:-

"D:\PhotoResize400.exe" -f1920x1080 -n -m -u -r "-o Generating <QT><DSTPATH><QT><EN>" "-cD:\Pictures_Resized\<PATH><NAME>.JPG" "D:\Pictures"

However:-
1) If a file has an extension of ".jpeg", in the resized version it's changed to ".jpg"
2) Just need to work out how to do the mirror. ie: If a file/folder is removed in the source, how to remove it from the destination?

NeilF
on August 8th 2014

Solved (2)

"D:\PhotoResize400.exe" -f1920x1080 -n -m -u -r "-o Generating <QT><DSTPATH><QT><EN>" "-cD:\Pictures_Resized\<PATH><NAME>.JPG" "D:\Pictures"
ROBOCOPY "D:\Pictures" "D:\Pictures_Resized" *.jpg /PURGE /S /xo

However (1) is a major problem. The fact photoresize renames .jpeg to .jpg causes robocopy problems. The files are different names!

Is there anyway to retain the original jpeg extension?

It's like you need a <EXT> or <FULLNAME> variable to do:-
"D:\PhotoResize400.exe" -f1920x1080 -n -m -u -r "-o Generating <QT><DSTPATH><QT><EN>" "-cD:\Pictures_Resized\<PATH><FULLNAME>" "D:\Pictures"

Vlasta
on August 8th 2014

Perhaps you could do .jpeg and .jpg files in two steps with different commands using the -z parameter as a filter.

"D:\PhotoResize400.exe" -f1920x1080 -n -m -u -r "-o Generating <QT><DSTPATH><QT><EN>" "-cD:\Pictures_Resized\<PATH><NAME>.JPG" "-z*.jpg" "D:\Pictures"
"D:\PhotoResize400.exe" -f1920x1080 -n -m -u -r "-o Generating <QT><DSTPATH><QT><EN>" "-cD:\Pictures_Resized\<PATH><NAME>.JPEG" "-z*.jpeg" "D:\Pictures"
Page views: 3283       Posts: 4      
Select background
Vista & Win 7 icons
I wish there were...