China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-05 16:41
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » [Help] Why doesn't my choice work View 750 Replies 3
Original Poster Posted 2007-08-22 10:27 ·  中国 山西 吕梁 孝义市 联通
中级用户
★★
Credits 216
Posts 81
Joined 2007-08-06 12:23
18-year member
UID 94721
Gender Male
Status Offline
@echo off
cls
echo.
echo A Microsoft Editor
echo B Microsoft Anti-Virus
echo C Microsoft Backup
echo.
choice /c:abc Choose an option
if errorlevel 3 goto MSBackup
if errorlevel 2 goto Msav
if errorlevel 1 goto Edit
:Edit
edit
goto End
:Msav
msav
goto End
:Msbackup
msbackup
goto End
:End
Why does my choice never work
Attachments
a.jpg
Floor 2 Posted 2007-08-22 10:44 ·  中国 浙江 温州 电信
中级用户
★★
Credits 458
Posts 196
Joined 2006-10-05 12:04
19-year member
UID 64614
Status Offline
XP doesn't come with choice.exe
Floor 3 Posted 2007-08-22 11:20 ·  中国 山西 吕梁 孝义市 联通
中级用户
★★
Credits 216
Posts 81
Joined 2007-08-06 12:23
18-year member
UID 94721
Gender Male
Status Offline
So does that mean my machine can't use choice then?
Floor 4 Posted 2007-08-22 12:23 ·  日本 FUJITSU公司
初级用户
Credits 43
Posts 19
Joined 2007-08-19 08:47
18-year member
UID 95320
Gender Male
Status Offline
Use set /P instead of choice
Forum Jump: