Home | Forums | What's new | Resources | |
Any DOS gurus here? |
mal - Aug 5, 2005 |
vbt | Aug 5, 2005 | |||
I guess something like this : @echo off :start cls echo My Menu echo 1.a echo 2.b echo 3.c echo 4.d choice /c:1234 if errorlevel 4 goto d if errorlevel 3 goto c if errorlevel 2 goto b if errorlevel 1 goto a :a cd\ titi.exe goto exit :b cd\ titi.exe goto exit :c cd\ titi.exe goto exit cd\ titi.exe goto exit :exit cls |
mal | Aug 5, 2005 | |||
Thanks vbt. :thumbs-up: IIRC (I'm home now) that's pretty much what I had, but it just ran the first option no matter what I chose. I guess I must have missed something. |
vbt | Aug 5, 2005 | ||||
put rem before the echo off, maybe you're using win2000 or winxp, the choice function may be no more available. EDIT : uploaded |
dibz | Aug 11, 2005 | |||
Actually you probably had the error levels reveresed in the choice option. It makes a difference. |
Scared0o0Rabbit | Aug 13, 2005 | |||
I always wondered how you did choices in batch files... but was too lazy to look it up lol. |
antime | Aug 13, 2005 | |||
In cmd.exe, set /p... sets an environment variable from user input. |
mal | Aug 14, 2005 | |||
I've finally had a chance to try it out and it works as I'd hoped. Thanks again vbt. :cheers |