How do I loop all the files in a given folder and then resize all images to 300x300?
I need some clue on how to do this in windows batch script.
This is my cmd.bat:
FOR EACH %%a in (*.jpg) DO convert.exe %%a -resize 640x640 C:\Temp\Destination\%%~na.jpg
This is how I am trying to call it:
cmd.bat c:\temp\images
But it is not writing anything to C:\Temp\Destination\
Thanks
Need help with this IM batch command
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Need help with this IM batch command
Do not use c: in the template. IM considers it to be a image format codec, not a Dos Drive.
Instead just use \Temp\Destination\%%~na.jpg
Instead just use \Temp\Destination\%%~na.jpg
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/