I was working on a batch file and asked if i was using the best term for case-sensitive userinputs.
My code : if /I "%User_Choice%"=="X" goto END
Aria Reply : Yes, if you want to check for both uppercase and lowercase "X," you would need two separate lines.
Here's the modified code:
if /I "%User_Choice%"=="[X](https://www.google.com/search?q=X)" goto END
if /I "%User_Choice%"=="[x](https://www.google.com/search?q=x)" goto END
With these two lines, if User_Choice is either "X" or "x," the script will jump to the END label.
The /I switch makes the comparison case-insensitive.
I asked again about another fix and got more Google Urls in the code.
See pic.