How To Resize Images From Command Line (Free Script)

Since AutoHotkey not many people bother writing batch scripts anymore, but often they’re easier to make, like this one to quickly resize images from command line!

image batch resizer

Don’t want to understand this script? Jump directly to download

Writing The Batch Script

Tip: For writing CMD batch scripts, I always use the documentation website

1. Step First of all I downloaded this very cool Light Image Resizer for Windows 7 that provides various command line switches as well

2. Step After the installation, I opened up notepad++ to start writing the batch

Because I added this script to my context menu, everything will assume to happen in the current directory (CD) working directory.

set basedir=%CD%

3. Step We need a thumbs folder and I want all images copied there automatically!

mkdir “thumbs”
XCOPY /Y %CD%\*.* %CD%\thumbs\

4. Step We now set a variable using the set command.

set thumbDIR=%CD%\thumbs\

5. Step Next, we are going to set the directory for the Image Resizer

set obviousDIR=”C:\Program Files (x86)\ObviousIdea\Image Resizer 4\Resize.exe”

6. Step Now let’s CD into the “obviousDIR” and run the Image Resizer using a profile that I called 550px. Please keep in mind that you need to create your own profile in Light Image Resizer and then change 550px to your own profile.

CD obviousDIR
%obviousDIR% %thumbDIR% /profile=550px /run

7. Step The switch /run makes the Image Resizer process the images immediately. If you first want to review everything, you can remove that switch

8. Step Finally, it would be cool if all of those images are copied to my clipboard (the filenames not the images themselves)

DIR /B /A:-D /O:N | clip

Here’s The Final Batch Script To Resize Images From CMD

# Command Line Image Script Written by - please link back and give credits
set basedir=%CD%
mkdir "thumbs"
XCOPY /Y %CD%\*.* %CD%\thumbs\
set thumbDIR=%CD%\thumbs\
set obviousDIR="C:\Program Files (x86)\ObviousIdea\Image Resizer 4\Resize.exe"
CD obviousDIR
%obviousDIR% %thumbDIR% /profile=550px /run
CD basedir
DIR /B /A:-D /O:N | clip

As you can see, we only need a few lines of code and now have a great script to resize images

Download Script

We prepared a little .bat file that you may use. If you repost it on another site, please give us credit and link to the article not the download itself or it will be removed.

Download Image Resize Batch Script

5 of 5 0 (100%) 2 votes
- Cheers!

Written by:
Oliver is the founder and lead editor of this site. He is interested in finding new ways to break Windows, find common errors and help others to fix them. Aside from that, he loves to fully customize systems with Rainmeter and Dreamscene, find out more about ancient civilizations like the Chachapoya, sharpen his digital photography skills and create software with a small group of selected developers. If you would like to connect with him to discuss anything, send him a mail!

Learn More About.Me

Follow me on Twitter for daily updates:

Contact The Author:

Get Free Help

Connect With Our Site:



Need help? Ask a question at our QA site, click the red button to get started:
Want to support us? Great, simply buy your favorite games from G2A via our referral link ( and save money at the same time:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Current day month ye@r *