home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / batch / batbox26.zip / GENERIC.BAT < prev    next >
DOS Batch File  |  1992-04-08  |  2KB  |  61 lines

  1. rem This menu will work with any BATBOX menu file.  However, you must
  2. rem create a separate batch file for each menu choice, which contains
  3. rem the commands to be executed when that menu item is chosen.  These
  4. rem batch files must be named 1.BAT (for menu item 1), 2.BAT, (for menu
  5. rem item 2), and so on, up to 9.BAT for item 9.  Don't forget to include
  6. rem a QUIT option.
  7. echo off
  8. :begin
  9. batbox        /o /w300
  10. rem     substitute the name of your menu file here.  Don't forget to include
  11. rem the /o switch.  The /w300 sets up a "timeout" feature which exits the
  12. rem menu after 5 minutes of inactivity.
  13. if errorlevel 255 goto TIMEOUT
  14. if errorlevel 10 goto TEN
  15. if errorlevel 9 goto NINE
  16. if errorlevel 8 goto EIGHT
  17. if errorlevel 7 goto SEVEN
  18. if errorlevel 6 goto SIX
  19. if errorlevel 5 goto FIVE
  20. if errorlevel 4 goto FOUR
  21. if errorlevel 3 goto THREE
  22. if errorlevel 2 goto TWO
  23. :ONE
  24. call 1.bat
  25. rem  use COMMAND /C 1.BAT (and so on) for DOS versions prior to 3.3
  26. goto begin
  27. :TWO
  28. call 2.bat
  29. goto begin
  30. :THREE
  31. call 3.bat
  32. goto begin
  33. :FOUR
  34. call 4.bat
  35. goto begin
  36. :FIVE  
  37. call 5.bat
  38. goto begin
  39. :SIX
  40. call 6.bat
  41. goto begin
  42. :SEVEN
  43. call 7.bat
  44. goto begin
  45. :EIGHT
  46. call 8.bat
  47. goto begin
  48. :NINE
  49. call 9.bat
  50. goto begin
  51. :TEN
  52. rem Batch file ends here and returns you to DOS (assumes item 10 is QUIT).
  53. goto end
  54. :TIMEOUT
  55. rem Include whatever commands here you want executed if no key is pressed
  56. rem within 5 minutes.  For example, you could use a separate batch file
  57. rem TIMEOUT.BAT as shown below.
  58. call timeout.bat
  59. :END
  60.  
  61.