dangerous yet practical script to resize images in an exported Maps folder

mCasualmCasual Posts: 4,604
edited February 2013 in Freebies

first the warning : if you place this batch file in a folder and run it, many files will be re-sized to a maximum dimension of 1024 pixels

Purpose : if you place this batch file in a folder and run it, many files will be re-sized to a maximum dimension of 1024 pixels

you must first install imagemagick, a free image processing utility

in this example i installed it in c:\imagemagick

the dangerous yet practical batch file


for %%a in (A5*.jpg ) DO c:\imagemagick\convert %%a -resize 1024x1024 %%a
for %%a in (Val*.jpg ) DO c:\imagemagick\convert %%a -resize 1024x1024 %%a
for %%a in (ago*.jpg ) DO c:\imagemagick\convert %%a -resize 1024x1024 %%a

here you can see the batch file with the help of imagemagick will resize all jpg images fith filenames starting in "A5" "Val" and "ago"

if you wanted to indiscriminately resize all the jpegs, you could use


for %%a in (*.jpg ) DO c:\imagemagick\convert %%a -resize 1024x1024 %%a

if you want a drag-and-drop solution you could use a batch file like


c:\imagemagick\convert %1 -resize 1024x1024 %1
Post edited by mCasual on
Sign In or Register to comment.