Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command "CHOICE" 1

Status
Not open for further replies.

Benedikt83

Programmer
Mar 21, 2003
5
DE
Dear WinXP-Users,

when writing a batch file for copying files from a backup-drive I found out that there is no command "choice" available. Why isn't the file choice.exe installed with windows and where can I get it from?

Thanx a lot
Benedikt
 
Its choice.com (not exe) & you can get it from a win9x/ME installation (works fine on NT based o/s - 2k/xp)
 
Using the NT or later CMD language extension SET/P works as well without requiring any software from Win9x-ME:


echo.
echo 1. East
echo 2. West
echo 3. South
echo 4. North
echo.
:choice
set /P CH=[1,2,3,4]
if "%CH%"=="1" goto c_East
if "%CH%"=="2" goto c_West
if "%CH%"=="3" goto c_South
if "%CH%"=="4" goto c_North
goto choice
:: Below would follow the labels for each option

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top