|I have been doing some research on this topic myself. I have come up with this code:|
set /p name=Enter Name:
for /f "tokens=* delims= " %%a in ('dir/b/a-d *.txt') do (
set /a N+=1
ren %%a %name%!N!.txt
I have used it and it seems to work pretty well, the only issue I have found is that if the name has a space in it the code will not change the name. Still working on the fix for it. If anyone can add to this it would be greatly appreciated. Hope this helps. One thing to note, there is no directory setup so this file needs to be in the same directory as the files.