- Batch Script Tutorial
- Batch Script - Home
- Batch Script - Overview
- Batch Script - Environment
- Batch Script - Commands
- Batch Script - Files
- Batch Script - Syntax
- Batch Script - Variables
- Batch Script - Comments
- Batch Script - Strings
- Batch Script - Arrays
- Batch Script - Decision Making
- Batch Script - Operators
- Batch Script - DATE & TIME
- Batch Script - Input / Output
- Batch Script - Return Code
- Batch Script - Functions
- Batch Script - Process
- Batch Script - Aliases
- Batch Script - Devices
- Batch Script - Registry
- Batch Script - Network
- Batch Script - Printing
- Batch Script - Debugging
- Batch Script - Logging
- Batch Script Resources
- Batch Script - Quick Guide
- Batch Script - Useful Resources
- Batch Script - Discussion
Batch Script - CHOICE
This batch command provides a list of options to the user.
Syntax
CHOICE /c [Options] /m [Message]
Where Options is the list of options to provide to the user and Message is the string message which needs to be displayed.
Example
@echo off echo "What is the file size you what" echo "A:10MB" echo "B:20MB" echo "C:30MB" choice /c ABC /m "What is your option A , B or C"
Output
The above program produces the following output.
"What is the file size you what" "A:10MB" "B:20MB" "C:30MB" What is your option A , B or C [A,B,C]?
batch_script_commands.htm
Advertisements
To Continue Learning Please Login
Login with Google