CMD常用命令10用户交互判断重新运行或直接运行

::Hansen
::2012-02-22

@call Clean.bat
@call SetEnv.bat
@title XXXX

:RunHere
@cls
@xxxxxxxxxxxx
@echo 运行完毕

:StartInput
@set /p var=重新运行(R)还是退出(E)?
@if /i "%var%"=="E" exit()
@if /i "%var%"=="R" (goto RunHere)
@echo 输入错误,请重试!
@goto StartInpu

Leave a Reply

Your email address will not be published. Required fields are marked *

*