Is there an easy way to change the variable %errorlevel% to another variable while using choice?

后端 未结 0 1804
悲哀的现实
悲哀的现实 2020-12-03 02:43

I suppose you could do:

@echo off
echo 1 - Start
echo 2 - Stop
choice /c 12 /n
if %errorlevel% == 1 (set /a newvariable=1)
if %errorlevel% == 2 (set /a newvar         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题