Kedgeboy
asked on
Renaming a number of files sequentially
Hello
First off I know this is not really DOS but I'll ask away.
I have a number of files which I need to rename.
to Start with The files are called a number of things, and I would like to rename them sequentially
eg
rename oldfilea.dat to New file 1.dat
rename another.dat to New file 2.dat
rename bounce.dat to New file 3.dat.....
it does not matter the order in which the files are re-named but the final names must be sequential, from 1 up to n (where n is the number of files in the folder)
Is there a looping batch file I can use to accomplish this?
Cheers in advance
First off I know this is not really DOS but I'll ask away.
I have a number of files which I need to rename.
to Start with The files are called a number of things, and I would like to rename them sequentially
eg
rename oldfilea.dat to New file 1.dat
rename another.dat to New file 2.dat
rename bounce.dat to New file 3.dat.....
it does not matter the order in which the files are re-named but the final names must be sequential, from 1 up to n (where n is the number of files in the folder)
Is there a looping batch file I can use to accomplish this?
Cheers in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I was close with my script, but that worked a charm
Cheers Steve