CODE: [Copy to clipboard]
setlocal enabledelayedexpansion
color 0A
set targerpath=c:\temp
set fyyyymm=2007.05
:id_loop
echo.
set id=
set /p id=input the id number:
if "!id!" == "" (
cls
echo error - the id is null¡
echo.
goto id_loop
) else (
pushd !targerpath!\!fyyyymm!
if not exist "!id!" (
md !id!
) else (
popd
echo the !id! exist¡
echo.
:rade_loop
set rade=
set /p rade=renamedeltreeexit
if "!rade!" == "" (
cls
echo error - select the string¡
pause>nul
goto rade_loop
) else (
call :!rade! 2>nul || call :p REM 在这里选择e或r时,CALL命令均调用:P 的这段代码
pause>nul
goto :eof
:p
echo error - select the string!
goto :rade_loop
goto :eof
:e
echo this is exit!
goto :eof
:r
echo this is rename!
goto :eof
)
)
)
[