SET /P - Prompt for user input (accepts a whole string instead of one keypress). “If you limit your choices only to what seems possible or reasonable, you disconnect yourself from what you truly want, and all that is left is compromise” - Robert Fritz IF %ERRORLEVEL% EQU 2 goto sub_hard_drive If you need to include a quotation mark within the message string, it needs to be escaped by doubling it: " message""withquote"ĬHOICE can be used to set a specific %errorlevel%įor example to set the %errorlevel% to 6 :ĬHOICE /C CH /M "Select CD or Hard drive" M " text" Message string to describe the choices available.ĮRRORLEVEL will return the numerical offset of choiceKeys. D choice Default choice made on Timeout. If Timeout is 0 there will be no pause and the N Do not display choiceKeys at the end of the prompt string. C choiceKeys One or more keys the user can press. Choice allows single key-presses to be captured from the keyboard.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |