联盟域名:www.cn-dos.net 论坛域名:www.cn-dos.net/forum DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!
@echo off&setlocal enabledelayedexpansion for /f %%a in ('dir/b *.MID') do ( set tmp=%%~na set tmp=!tmp:GAME=! if !tmp! lss 10 set tmp=0!tmp! ren %%~a !tmp!%%~xa )
@echo off&setlocal enabledelayedexpansion for /f %%a in ('dir/b *.MID') do ( set str=%%~na set str=!str:GAME=! call :A-Z ren %%~a !str!%%~xa ) exit :A-Z set N=0 for /f %%n (A B C D E F G H I J K L M N O P Q R S T U V W X Y Z) do ( set /a N+=1 if "!str!" == "!N!" set str=%%n&goto :eof ) goto :eof
set a=xabcdefghi for /f "delims=GAME." %%i in ('dir /b game*.mid') do ( set /a b=%%i%%10,c=%%i/10 call :rrr %%i %%b%% %%c%%) goto :eof :rrr call echo ren game%1.mid game%3%%a:~%2,1%%.mid goto :eof