set /a number=%number%+1
This increases the number by one. To use the number with a file name use
If you meant renaming the files, then this should work:
(Assuming all of the files are in its own folder)
for /f "tokens=*" %%A in ('dir /b *.xlsx') do (
set /a num=!num!+1
:: xcopy "%%A" "temp" > nul
:: ren "temp\%%A" "!num!.xlsx" > nul
:: move "temp\!num!.xlsx" "processed" > nul
Echo %%A -^> !num!.xlsx
Echo Processing complete
pause > nul
To make it actually process, you'd have to remove the "::", just for safety.
It creates a folder called "processed" in which all the processed files are put. This script must run in the folder where the files are located.
You can delete the "temp" folder after the processing is complete.
Don't worry if plan A fails, there are 25 more letters in the alphabet ;)
message edited by RainBawZ