if not exist cropped mkdir cropped setlocal enabledelayedexpansion enableextensions rem start coords set /a cy=33 set /a cx=0 rem size set x=4045 set y=6865 for %%i in (*.tif) DO ( set /A cy=%cy%-4 rem convert %%i -crop %x%x%y%+%cx%+!cy! +repage -type Grayscale cropped\%%i.png convert %%i -crop %x%x%y%+%cx%+!cy! +repage cropped\%%i.png ) endlocal rem convert *.jpg -crop 1600x2490+213+2450 +repage pages/even/even.jpg