I need batch script to copy all files from one directory to another and rename them all to a default name (ex. NAME54.pdf) and continue counting from destination`s maximum number in name. I wrote some script but it seems not working:
@echo on
D:
set count=0
for %%a in (scans1\*.*) do (
set /a count+=1
)
set count1=0
for %%b in (scans\*.*) do (
set /a count1+=1
)
for /l %%c in (1,1,%count1%) do (
set /a count+=1
copy D:\scans\*.* D:\scans\NAME%count%.pdf
)
pause