home *** CD-ROM | disk | FTP | other *** search
/ Windows Shareware GOLD / NuclearComputingVol3No1.cdr / _bbs4 / f1154.zip / TEST.BAT < prev    next >
DOS Batch File  |  1991-03-02  |  1KB  |  48 lines

  1. @ECHO OFF
  2.  
  3. ; the following line runs windows
  4. WIN
  5.  
  6. ; the following line parses the file created by ExitW and
  7. ; modifies the environment variables or returns a DOS errorlevel
  8. ; code.  It can also do both or neither of the above.
  9. ; note that this example uses a data file contained in C:\WIN
  10. EXITWDOS C:\WIN\EXITW.DAT
  11.  
  12. ; if the returned error level code is 3 then run autocad
  13. IF ERRORLEVEL 3 GOTO AUTOCAD
  14.  
  15. ; if the returned code is 2 then run wordperfect
  16. IF ERRORLEVEL 2 GOTO WORDP
  17.  
  18. ; if the code is 1 then run lotus
  19. IF ERRORLEVEL 1 GOTO LOTUS
  20.  
  21. ; if the errorlevel code is none of the above then just exit to DOS
  22. GOTO END
  23.  
  24. :AUTOCAD
  25. ; run autocad
  26. CD \AUTOCAD
  27. ACAD
  28. ; now call this batch file to start the cycle again
  29. WINBAT
  30.  
  31. :WORDP
  32. ; run WordPerfect
  33. CD \WP
  34. WP
  35. ; now call this batch file to start the cycle again
  36. WINBAT
  37.  
  38. :LOTUS
  39. ; run 123
  40. CD \123
  41. 123
  42. ; now call this batch file to start the cycle again
  43. WINBAT
  44.  
  45.  
  46. :END
  47. ; jumping to this point just dumps the user back to DOS
  48.