I'm new here as you can see, but I've been searching around the net for a while now trying to figure this out without any luck, so I'm hoping somebody here can help me out.
I have the following script:
Code: Select all
setlocal enabledelayedexpansion
set Dupe=1
for /R C:\ %%F in (*.mp3, *.m4a) do (
:timer
if exist "E:\Temp1\%%~nF-%Dupe%%%~xF" (
set /a Dupe=Dupe+1
goto timer
) else (copy "%%~fF" "E:\Temp1\%%~nF-%Dupe%%%~xF")
)
pause
Which is supposed to copy all the MP3 and M4A files from my C drive to my E drive, renaming duplicates as it goes.
However, for some reason I've got an issue with it; If it DOES encounter a duplicate, it fails.
Hope somebody can help me out.
Thanks,
Scott