home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
dosutils
/
bbox22.arj
/
GENERIC.BAT
< prev
next >
Wrap
DOS Batch File
|
1991-11-20
|
1KB
|
53 lines
rem This menu will work with any BATBOX menu file. However, you must
rem create a separate batch file for each menu choice, which contains
rem the commands to be executed when that menu item is chosen. These
rem batch files must be named 1.BAT (for menu item 1), 2.BAT, (for menu
rem item 2), and so on, up to 9.BAT for item 9. Don't forget to include
rem a QUIT option.
echo off
:begin
batbox /o
rem substitute the name of your menu file here. Don't forget to include
rem the /o switch.
if errorlevel 10 goto TEN
if errorlevel 9 goto NINE
if errorlevel 8 goto EIGHT
if errorlevel 7 goto SEVEN
if errorlevel 6 goto SIX
if errorlevel 5 goto FIVE
if errorlevel 4 goto FOUR
if errorlevel 3 goto THREE
if errorlevel 2 goto TWO
:ONE
call 1.bat
rem use COMMAND /C 1.BAT (and so on) for DOS versions prior to 3.3
goto begin
:TWO
call 2.bat
goto begin
:THREE
call 3.bat
goto begin
:FOUR
call 4.bat
goto begin
:FIVE
call 5.bat
goto begin
:SIX
call 6.bat
goto begin
:SEVEN
call 7.bat
goto begin
:EIGHT
call 8.bat
goto begin
:NINE
call 9.bat
goto begin
:TEN
rem Batch file ends here and returns you to DOS (assumes item 10 is QUIT).