Resize all files using ImageMagick’s convert under Windows

Written by James McDonald

September 9, 2009

This is a very quick script to resize all files of type jpg to 1024×1024 (longest edge becomes 1024 pixels) and name them “1024-originalfile name.jpg” using ImageMagick for Windows

Open a command prompt and cd into the folder containing your jpg’s and run the following.

for /f "usebackq delims=" %x in (`dir /b *.jpg`) do convert "%x" -resize 1024x1024 "1024-%x"

0 Comments

Submit a Comment

Your email address will not be published.

You May Also Like…

ZPL SBPL

Zebra Printer Language http://labelary.com/viewer.html The above website has a page where you can enter ZPL and it...

PHP Iterators

Just came across a Youtube talk "Iterators in PHP" by Jake Smith published in 2014 that steps through the many...

PHP array_map Multiple Arrays

array_map can take multiple arrays. I like how it starts mapping through them starting at the first element of each...