I have this batch file which renumbers all the files in a particular directory i.e. Test
for %%i in (C:\Test\*.txt) do (
call ren %%i rep%%n%%.tx_
set /a n=n+1)
ren *.tx_ *.txt
Its working fine however I have 10 sub-folders in Test (Main folder), how can I goto each sub-folder and renumber files?