谁能告诉我为什么这不起作用。当我输入 ether 1 或 2 时我想要它,goto
但是当我输入数字时它会继续运行ECHO ERROR
任何人都可以帮助:-)。
ECHO OFF
ECHO Loading...
SET option=0
SET /P option=Choose a number and press enter. :
ECHO %option%
if "%option" == "1" GOTO one
if "%option" == "2" GOTO two
GOTO EXIT
:one
ECHO hello
GOTO EXIT
:two
ECHO hi
GOTO EXIT
:EXIT
ECHO EXIT
Taskkill /f /im program.bat 2>%USERPROFILE%\temp.txt
ECHO ERROR
pause