Created
March 19, 2022 14:47
-
-
Save danishi/75f1950e8e19fc7ad7cff1bd4f527ac9 to your computer and use it in GitHub Desktop.
CASE expression in a batch file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| set Case=? | |
| set /p Case=? | |
| :Select | |
| goto Case%Case% | |
| :Case1 | |
| echo case1 | |
| goto CaseEnd | |
| :Case2 | |
| echo case2 | |
| goto CaseEnd | |
| :Case3 | |
| echo case3 | |
| goto CaseEnd | |
| :Case? | |
| echo case? | |
| goto CaseEnd | |
| :CaseEnd | |
| pause > nul |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment