Hey guys, I have this menu in batch script:
1 - A
2 - B
3 - C
4 - D
5 - runAll
6 - QuitRight now, what I do with it is if the user enter 1, then it runs the 1st one and loops back to the menu, 2 for the 2nd, etc. If the user enters 5 then my script goes and runs 1 through 4 step by step in order.
My question is: "Is it possible to run/execute certain ones that you choose to execute?" Let's say I want to execute 1 & 4 and loop back to the main menu. I enter "1(space)4" and the script takes those arguments/parameters and goes and finds the corresponding option and executes it. Does it make sense? Is it possible?I do have the option of running each one of those options separately, but this idea, the one I'm talking about, makes it more efficient and faster.
Basically like this: @echo off echo 1-option1 echo 2-option2 set /p "opts=enter options" for %%i in (%opts%) do goto :opt%%i :opt1 ... goto :eof :opt2 ... goto :eof :opt3 ... goto :eof etc...Tony
Yeah I had call originally but can't remember why I changed it. Toy
Yes (14) | ![]() | |
No (14) | ![]() | |
I don't know (15) | ![]() |