Respected All!
A folder contained 45 files and I want to rename all these files by adding serial number in the start of each file like
1. BirthDayShots
2. BirthDayShots
3. BirthDayShots
.
.
.
.
.
45. BirthDayShots
Looking forward
Adding Serial Number while rename files through MS-Dos
Moderator: DosItHelp
Re: Adding Serial Number while rename files through MS-Dos
Is this what you mean?
Code: Select all
Setlocal EnableDelayedExpansion
set i=0
set "filepath=C:\Folder\of\files"
for /R %filepath% %%a in (*.*) do (
set /a i+=1
ren "%%~dpnxa" "!i!. %%~nxa"
)
Re: Adding Serial Number while rename files through MS-Dos
Thank You! Serial Number added successfully but I also want to change file(s) names as well
Re: Adding Serial Number while rename files through MS-Dos
Asim,
Your technical specifications for what you wanted to accomplish was extremely lacking. If I was given this little information I would be giving this back to my business analysts to rewrite it. Please be more specific with what you want to accomplish. Provide complete input and output examples.
Your technical specifications for what you wanted to accomplish was extremely lacking. If I was given this little information I would be giving this back to my business analysts to rewrite it. Please be more specific with what you want to accomplish. Provide complete input and output examples.