level 1











@璐村惂鐢ㄦ埛_000076K馃惥 off&title By 无尾狼::将此脚本放入顶级目录
set "now=%~dp0"
setlocal EnableDelayedExpansion
:start
echo 输入数字编号即可
set num=0
for /f "tokens=*" %%a in ('dir /ad /b %now%') do (
set /a num+=1
echo !num!.%%a&set a!num!=%%a
)
set /p n=please enter:
if "%n%" equ "quit" exit
if defined a%n% cd %now%\!a%n%!&goto sss
goto error
:sss
set num1=0
cls&for /f "tokens=*" %%a in ('dir /a /b %cd%') do (
set /a num1+=1
echo !num1!.%%a&set a!num1!=%%a
)
if defined a%num1% goto aaa
goto error
:aaa
echo 输入back返回
set /p m=file:
if "%m%" equ "back" goto start
set line=0
for /f "tokens=1,2 delims=." %%i in ('dir /a /b %cd%') do (
set /a line+=1
if !line! equ %m% ren "%cd%\!a%m%!" %%i.xml
)
goto sss
:error
echo 没有找到此目录或出现未知错误
pause&exit
