Posts Tagged ‘Batch File’

User Input in Windows 2000 Batch Files – Solutions by PC Magazine

@ECHO OFF
CLS
:LOOP
ECHO A. Menu item A
ECHO B. Menu item B
ECHO C. Menu item C
ECHO Q. Quit
:: SET /P prompts for input and sets the variable
:: to whatever the user types
SET Choice=
SET /P Choice=Type the letter and press Enter:
:: The syntax in the next line extracts the substring
:: starting at 0 (the beginning) and 1 character [...]

Continue reading »