CHOICE command error in win 95 dos

I'm trying to write a batch file on my 95 IBM thinkpad, just to test my current programming abilities.

so far I have:
ECHO is this working
if errorlevel 1 goto HELLO
if errorlevel 2 goto GOODBYE

ECHO Not really
goto MENU

goto MENU

ECHO yes 2
goto MENU

It is supposed to as the user for a choice (1,2), if you press 1 it's supposed to say YES 1, press 2 and it should say yes 2, if it doesn't recognize the choice it's supposed to say not really.

so far, it will ask me for a choice ( it will say [Y,N]?)
but no matter what I put down, it will only say YES 1, even if I input 2 (where I want it to say yes 2).

any help with debugging this program or finding alternatives to allow users to put their input into a variable would be greatly appreciated (set /p variable= does not work in dos in my experience).

I just started trying to program things yesterday so I apologize for my ignorance on this topic.
1 answer Last reply
More about choice command error
  1. It should be:

    CHOICE /C:12
Ask a new question

Read More

Command Prompt IBM ThinkPad Windows