set /p your_choice="Please enter your choice (1,2,3): "
if %your_choice%==3 goto option3
if %your_choice%==2 goto option2
if %your_choice%==1 goto option1
echo Unrecognized option: %your_choice%
It can be useful sometimes to provide the user with a choice when running batch file from the command prompt (cmd.exe). This can be done with this command that prompts the user for input from the console and saves it in an environment variable: