|
Something like this might work.
@echo off
ren *.adx *.mp3
set Count=0
dir /b | findstr "[0-9][0-9].mp3" > tmp1.txt
sort tmp1.txt /+5 > tmp2.txt
for /f %%a in (tmp2.txt) do (call :incr
call :ReNumber %%a %%Count%%)
erase tmp?.txt *.tmp
exit /b
:incr
set /a Count=%Count%+1
goto :eof
:ReNumber %1 %2
if exist %1 (echo renamed %1 Old%2.mp3
ren %1 %1.tmp
ren %1.tmp Old%2.mp3) else (echo renamed %1 Old%2.mp3
ren %1 Old%2.mp3)
goto :eof
You may have to do some tweaking, but that'll get you close.
|