Example: User Input in MS-DOS
The following program presents the user with a menu, then prompts them for user input which is stored in a variable named choice.
@echo off
echo Main Menu
echo ---------
echo 1. Run Program #1
echo 2. Run Program #2
echo 3. Run Program #3
echo 4. Exit
set /p choice=Please enter menu choice:
Screenshot of above MS-DOS batch file running (where user entered 2 via keyboard):