I am trying to write a batch file that copies all *.r02
files from subfolders and put them in the current folder and rename them to avoid overwriting.
Not sure why the following code doesn't work?
@echo off
set Current_Dir = %cd%
For /r %%a in (*.r02) do (
set /a "counter+=1"
COPY "%%a" "%Current_Dir%\_%counter%"
)