I have this attached batch file which copies recursively all files from folders. If a file has the same name in two different folders, then it is renamed. It works very well and I got help on it from EE a year or more ago.
However, now I am dealing with dual layer DVDs, etc with thousands of folders. How can I have it copy all of the contents of a folder, run a script, then copy next folder, then run the script. Basically the same sort of looping fashion, but run a script in between each download of folder contents?
#------copy files from disc to destination while renaming files if duplicates exist is subfolders---
for /f "tokens=*" %%a in ('dir /a-d /b /s "%source%"') do (
if exist "%destination%\!filename!" call :GetNewFN "!filename!"
copy "%%a" "%destination%\!filename!"
if exist "%destination%\%filename%" goto loop