Batch image converter tool? Keep two folders in sync, one resized?

Soldato
Joined
15 Nov 2003
Posts
14,455
Location
Marlow
OK, I want a simple batch conversion tool that takes my original photo album and resizes it down into a mirror folder.

On subsequent runs it need not convert files that have already been done, only new ones, or ones that have since been updated? If folders have been renamed/deleted in the source folder, the destination should reflect this.

Any suggestions? Looked and had no luck!

Thanks!
 
Doesn't seem to offer an option to ignore photos already done.

When you're dealing 50,000+ photos, you'd only want to convert the 10 new ones, and not do all of them again :)
 
What if you tell it not to overwrite (under advanced options)? It's a bit lame, but I can't think of another way.
 
Got down to this scenario, using Photoresize & robocopy.

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

Only problem is, photoresize this will convert/transfer .jpeg files over to.jpg... and then robocopy will see their is a file in the destination (.jpg) not in the source (.jpeg) so remove it.

If only photoresize kept the same extension name! Ive raised this with them

I've got a feeling all my jpgs ar .jpg though!
 
I've been trying to do the exact same thing and after quite a while trying i think I've nailed it:

You'll need the nconvert.exe file to do this. Save it wherever you like and edit the location in the .bat code below. http://www.xnview.com/en/nconvert/

Code:
set source=C:\Users\Grrrrr\Pictures\
set dest=C:\Users\Grrrrr\Small Pictures\

xcopy "%source%*.jpg" "%dest%" /s /d

for /R "%dest%" %%I in ("*.jpg") do "C:\Program files\nConvert\nconvert.exe" -resize longest 1920 -ratio -rtype lanczos -rflag decr  -q 80 -keepfiledate -overwrite "%%I"

pause

xcopy "%source%*.jpg" "%dest%" /s /d
This copies the images to the destination folder, importantly the /d command means only files where the source is newer than the destination are copied

for /R "%dest%" %%I in ("*.jpg") do "C:\Users\Peter\Small Pictures\nconvert.exe"
This loops through all the .jpg files in the destination and calls the convrter

-resize longest 1920 -ratio -rtype lanczos -rflag decr -q 80 -keepfiledate
These are the converter settings. I'm resizing down the longest side to 1920, it will ignore any files that already have longest side 1920 or lower. This means it won't reencode any images than have already been resized. The various options can be found here: http://newsgroup.xnview.com/viewtopic.php?f=57&t=12247

-overwrite "%%I"
This overwrites the copy the loop is converting
 
Last edited:
So your nconvert.exe does the same as my suggested photoresize400.exe, but doesn't lose the .jpg extension name?

Are sub folders done too?
 
Last edited:
Sub folder are done, yes, not sure about about the jpeg issue though. It probably will with a small change to the code but I can't check it until later.

I have to say I didn't actually mean to reply, I wanted to check it a little more but I clicked submit instead of preview :o

I've thought of one other problem over night and that's that it doesn't track deletions.
 
Back
Top Bottom