A Batch Script To Resize Images

Once you install ImageMagick for Windows, you can use magick command-line tool, e.g.

magick.exe mogrify -resize 250x250 -path 250x250/ *.png *.jpg
magick.exe mogrify -resize 125x125 -path 125x125/ *.png *.jpg

Note: Make sure your magick.exe command is in your PATH system variable and you're pointing to the existing or created the destined folders (e.g. mkdir 250x250/ 125x125/ in above case).

For Linux/Ubuntu, see: How to easily resize images via command-line?


you can check scale.bat which can resize images without a need of installing additional software - it uses only the windows built-in capabilities:

@echo off
set "source_folder=c:\images"
set "result_folder_1=c:\res1"
set "result_folder_2=c:\res2"

for %%a in ("%source_folder%\*jpg") do (
   call scale.bat -source "%%~fa" -target "%result_folder_1%\%%~nxa" -max-height 250 -max-width 250 -keep-ratio no -force yes
)

for %%a in ("%source_folder%\*jpg") do (
   call scale.bat -source "%%~fa" -target "%result_folder_2%\%%~nxa" -max-height 125 -max-width 125 -keep-ratio no -force yes
)

Check also this.


Use Image Resizer for Windows:

enter image description here

enter image description here