Windows Batch Program

Yo-Yo

Member
I am in need of help developing a batch file to rename a series of files with names ranging from "00000.MTS to 00055.MTS" (one number increase per file) to "00100.MTS to 00155.MTS".

Basically, the program should just "shift" the file names up. It would be great if it would also ask for the number is should start the new file numbering with. I'm looking for any help you can provide.

sidenote:
here's the only code i have from an old project that just removes part of a filename:

@echo off
setlocal enabledelayedexpansion
set deletestring=_1
echo Ready to start
echo.
for /f "delims==" %%F in ('dir /b ^| find "%deletestring%"') do (
set oldfilename=%%F
set newfilename=!oldfilename:%deletestring%=!
Ren "!oldfilename!" "!newfilename!"
)
echo.
echo All done
pause
 
Back
Top