I'm running a basic convert command, which works perfectly when I type/copy it into DOS;
convert c:\Photo_Uploads\camera\*.jpg -resize 20% -set filename:fname '%t_tn' +adjoin z:\%[filename:fname].jpg
All it does is resize the jpg's and move them to another folder. If I use this command in a batch file, it fails with the following error;
convert.exe: invalid argument for option `-resize': 20fname @ error/convert.c/ConvertImageCommand/2451.
So it looks like it doesn't even call the whole command before failing. I can't figure it out and am at my wits end. If anyone can suggested anything I'd be in their debt!!
ARGH!! Command works but not in batch file?!!
Re: ARGH!! Command works but not in batch file?!!
You need to escape the % in a batch file usualy with another %.
Check out this page
You probably need to change '%t_tn' to "%%t_tn" as Windows needs " and not '
Check out this page
You probably need to change '%t_tn' to "%%t_tn" as Windows needs " and not '
Re: ARGH!! Command works but not in batch file?!!
Thanks for your help, though if I double the % signs;
convert c:\Photo_Uploads\camera\*.jpg -resize 20% -set filename:fname '%%t_tn' +adjoin z:\%%[filename:fname].jpg
although it takes longer to run, it fails with the same error message;
convert.exe: invalid argument for option `-resize': 20fname @ error/convert.c/ConvertImageCommand/2451.
convert c:\Photo_Uploads\camera\*.jpg -resize 20% -set filename:fname '%%t_tn' +adjoin z:\%%[filename:fname].jpg
although it takes longer to run, it fails with the same error message;
convert.exe: invalid argument for option `-resize': 20fname @ error/convert.c/ConvertImageCommand/2451.
Re: ARGH!! Command works but not in batch file?!!
Heh, I feel like a right tool now!! That worked, thanks a million for your help