Back in the day I use to have a menu in my autoexec.bat for options. The options were pretty much Enter ( 1 ) for this option, and Enter ( 2 ) for this other option, and so on. The options were then individual batch files named by number such as 1.bat and 2.bat located in the root of the drive with autoexec.bat and so if you pressed 2 and then the enter key it would process the batched instructions contained within 2.bat
so if the following was in 2.bat
cls
@echo. Hello World
And you enter 2 at the command line
you would have something like
Hello World
c:\>
You can also do away with the @echo. and just use
echo. if you use
Echo Off at the beginning. This will hide the command prompt until Echo On is executed.
echo off
cls
echo. hello world
pause
echo on
This is a description of what the above does:
1.) Echo Off to hide command prompt
2.) cls to clean screen
3.) echo. hello world so "hello world" is displayed ( Print to Screen = echo. ) in this case.
4.) pause to pause the batches execution until any key is pressed
5.) Echo On to bring back the command prompt
So a simple menu can be set up like this named autoexec.bat
Echo Off
cls
echo. Please chose from the following options
echo. -----------------------------------------------------
echo. Enter ( 1 ) to Start Process 1
echo. Enter ( 2 ) to Start Process 2
echo. Enter ( 3 ) to Start Process 3
echo. Enter ( Q ) to exit menu
1.bat will contain the batched instructions for option 1
2.bat will contain the batched instructions for option 2
3.bat will contain the batched instructions for option 3
q.bat will contain the batches instructions for (q or Q key - not case sensitive on MS OS ) and at the end of the batch instructions contained within q.bat you might want to issue a Echo On command to bring the command prompt back to the user.
If you want to have it all contained within a single batch you can use goto statements, but I am trying to make this as simple for you to comprehend as possible. Isolating the batched instructions also makes management of it easier as for instead of having 1 batch with everthing contained within it, you can modify the batch for option 2 etc and if you have a typo your batch will function until you get to option 2 and then you know that the issue is contained within 2.bat etc. If you want to have a single batch such as all choices listed and goto's it can be done in a menu type batch with gotos.
The above was written for MS OS .... are you doing this on a SUN OS since your user name is SUN_OS? If so the q and Q will be case sensitive and cls for clear screen I think is "CLEAR" instead of CLS etc. There also may be differences in how the echo works under SUN. Its been a long time since I played with SUN OS