Write a batch file in Windows to rename folders yearwise -
i have 123 folders. want rename them 1895 2013. tried:
for /d in (j:\cinema\years\*) rename "%%k" "%%~nx(d+1894)"
but think d
not integer varaible. i've done stupid.
you'd have create variable , increment it.
this code tested locally:
setlocal enableextensions enabledelayedexpansion set count=1985 /d %%k in (j:\cinema\years\*) ( rename "%%k" "!count!" set /a "count+=1" )
Comments
Post a Comment