Originally posted by wtwangcb at 2007-7-6 08:47 AM:
@ECHO OFF
choice/c:AB
IF ERRORLEVEL 2 GOTO B
IF ERRORLEVEL 1 GOTO A
:A
CALL A.BAT
GOTO END
:B
CALL B.BAT
:END
[ Last edited by wtwangcb on 2007-7-6 at 08:49 AM ]
[ Last edited by shawell518 on 2007-7-7 at 11:10 PM ]作者: oioc 时间: 2007-7-6 01:52 不是很懂, 不过想来应该是做个选择菜单吧,要不然只能把你的A.bat做成A.com了作者: wtwangcb 时间: 2007-7-6 08:47 @ECHO OFF
choice/c:AB
IF ERRORLEVEL 2 GOTO B
IF ERRORLEVEL 1 GOTO A
:A
CALL A.BAT
GOTO END
:B
CALL B.BAT
:END
[ Last edited by wtwangcb on 2007-7-6 at 08:49 AM ]作者: shawell518 时间: 2007-7-6 20:38
Quote:
Originally posted by wtwangcb at 2007-7-6 08:47 AM:
@ECHO OFF
choice/c:AB
IF ERRORLEVEL 2 GOTO B
IF ERRORLEVEL 1 GOTO A
:A
CALL A.BAT
GOTO END
:B
CALL B.BAT
:END
[ Last edited by wtwangcb on 2007-7-6 at 08:49 AM ]
谢谢 楼上的大侠
我试试
不过 请问 choice/c:AB
是什么意思?作者: haiou327 时间: 2007-7-7 01:05 看一下深山红叶的DOS工具箱就知道了作者: redbird 时间: 2007-7-7 06:56 windowxp上是没有choice命令的,我也在寻找这个问题的解决方法的。作者: qiuqiu123456 时间: 2008-2-21 00:55 @ECHO OFF
set /p a=
IF "%a%"=="2" GOTO B
IF "%a%"=="1" GOTO A
:A
CALL A.BAT
GOTO END
:B
CALL B.BAT
:END