Getkey is a keystroke input tool that sets ERRORLEVEL, like choice. Getvar
is a line-input tool that sets an environment variable. The download
includes MS-DOS and Win32 console versions of both programs.
If the query is 'what do I use in W2k instead of the 'choice'
command in Win9x then the answer is to use the 'SET' command (see
I use the following to branch from a single-digit input:
(SET /P Choice=Type the number and press Enter or Return: )
:: Reduce input to a single digit and test if valid
IF "%Choice%" NEQ "" SET Choice=%Choice:~0,1%
if x%choice% == x GOTO :NotValid
if %choice% GEQ 0 if %choice% LEQ 9 goto:item%choice%