CODE: [Copy to clipboard]@echo off set nm=0 for /r %%i in (*.jpg) do ( set /a nm+=1 call ren "%%i" %%nm%%.jpg )