Search notes:

choice.exe

choice.exe allow a cmd.exe batch file to present a list of options from which a user can choose from.
The number of the chosen item is then stored in %errorlevel% and different actions can be taken using an if statement.
choice /c rgb /M "Choose [r]ed, [g]reen or [b]lue"

if %errorlevel% equ 1 (
   echo Tomato
) else if %errorlevel% equ 2 (
   echo Peas
) else (
   echo Grapes
)
Github repository about-cmd.exe, path: /batch-files/choose.bat

See also

The /t option is also used in timout.exe for time out.

Index