for %%i in (*.tif) DO ( convert.exe %%i -type Grayscale pages\%%i.png ) pause rename pages\*.tif.png pages\*.png