74Views5Replies

Author Options:

What is the command in batch where you type a character and it saves the variable without you having to press enter? Answered

I've always wondered what that command is, so will anybody be nice and tell me what it is?

Comments

The forums are retiring in 2021 and are now closed for new topics and comments.
0
Brubay
Brubay

5 years ago

example 1:

choice /c 12 >nul
if %errorlevel%==1 "command"

if %errorlevel%==2 "command"

example 2:

choice /c 123 >nul
if %errorlevel%==1 "command"

if %errorlevel%==2 "command"

if %errorlevel%==3 "command"

0
Prof. Pickle
Prof. Pickle

8 years ago

The command you are looking for is definitely the CHOICE command.

Unfortunately, it was left out of some versions of windows... So you mightn't have it.

If you do, type in "choice /?" in your command prompt and it will display help for it.

0
wizerd 745
wizerd 745

11 years ago

I don't think there is, I'm not sure, but I don't think there is. Try asking some one like Shadow Ops or Padlock. (p.s. If you find out about one please p.m. me)

0
wizerd 745
wizerd 745

Answer 11 years ago

The closest I could find was the choice command.

0
account3r2
account3r2

Answer 10 years ago

what is the choice command?