Need help with *.bat file for batch resize
Posted: 2014-04-01T17:32:00-07:00
I need to resize multiple images in subfolders. If width<2000 then resize to 1440x2200 and other files to 2880x2200. But i'm getting all files in 1440x2200 and need help
Win7 x64

ImageMagick-6.8.8-10-Q16-x64@echo off
echo Resizing...
pushd %1
set "%%x==2000"
for /f "delims=" %%n in ('dir /b /s /a-d-h-s') do ("%~dp0identify.exe" -ping -format "%%w" "%%n") & If "%%w" lss "%%x" ("%~dp0mogrify.exe" -resize 1440x2200! "%%n") Else ("%~dp0mogrify.exe" -resize 2880x2200! "%%n")
popd
echo All done!
pause
Win7 x64