bat choice 命令

bat choice 命令

choice /c YNC /m "Are you sure?"

if %errorlevel%==1 goto Y

if %errorlevel%==2 goto N

if %errorlevel%==3 goto C

:Y

echo Y

:N

echo N

:C

echo C

注意:/c 后面的选项,在 %errorlevel% 中分别对应1 2 3 .....

posted @ 2019-04-12 14:16  ibingshan  阅读(1003)  评论(0编辑  收藏  举报