| Dictionary, Encyclopedia and Thesaurus - The Free Dictionary 1,795,480,521 visitors served. |
|
Dictionary/ thesaurus | Medical dictionary | Legal dictionary | Financial dictionary | Acronyms | Idioms | Encyclopedia | Wikipedia encyclopedia | ? |
DOS Choice |
0.02 sec. |
DOS ChoiceAn external command starting with DOS 6 that is used to provide user interaction in a batch file. It lets you ask a question and obtain a single character as an answer.
choice /c:abc /n Do you want A, B or C?
if errorlevel 3 goto thingc
if errorlevel 2 goto thingb
"do thing A here"
:thingb
"do thing B here"
:thingc
"do thing C here"
The choices follow the /c: switch. The answers are stored in the error level (A in 1, B in 2, etc.), which is then tested. If any other character is entered, the computer beeps and waits. The /n suppresses the message that would be displayed following your prompt. In the above case, it would be [A,B,C]? Note that the error levels must be tested from high to low order. The CHOICE.COM file provides this functionality. How to thank TFD for its existence? Tell a friend about us, add a link to this page, add the site to iGoogle, or visit webmaster's page for free fun content. |
|
| ? Mentioned in | |
|---|---|
|
| Encyclopedia |
| Free Tools: |
For surfers:
Free toolbar & extensions |
Word of the Day |
Help
For webmasters: Free content | Linking | Lookup box | Double-click lookup | Partner with us |
|---|