CODE: [Copy to clipboard]@ECHO %dbg% OFF setlocal ENABLEDELAYEDEXPANSION SET NO=0 FOR /F %%i IN ('dir /b *.jpg') DO ( SET /A NO+=1 REN %%i !NO!.JPG )