|"choice" is easy enough: "choice /?" will give you syntax for using the /c option. (hint, it wants a colon, no commas, and no quotes.) As for the other issues, batch is your target of study, and not "choice". I'm sure there's beucoup places to shop for good tutorials, and I can't begin to cover it all. First stop, commandline: FOR /?, SET /?, IF /?.|
In this particular instance: If you put quotes around one side of a compare (IF), put quotes around the other side (unless it already has them!)
If you compare system variables, such as errorlevel, you must either leave off the quotes or include the percents. Either way should work. Here's an example of variaous permutations, and also a demo of how to test and debug commands:
::=== begin sample batch
@echo off & setlocal
echo enter 'w', to run tests...
Choice /c:wasd /n
echo see what i mean?
if %errorlevel%=="1" echo ONE
if %errorlevel%==1 echo ONe
if "%errorlevel%"=="1" echo onE
if %errorlevel% ==1 echo One
if %errorlevel%=="1" echo oNe
Ie: if something fails, run tests that display all the variables, exactly as you're using them, and use pauses liberally to separate various displays (sorry if I sound like your sixth-grade math teacher, but debugging is very much in your future if you persist in writing code of any sort). Good luck...