home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / c / cman12a1.zip / TESTWIN.BAT < prev    next >
DOS Batch File  |  1993-01-28  |  1KB  |  31 lines

  1. REM  This file is an example of how to selectively run disk compressions,
  2. REM  backups, and other DOS programs that shouldn't be run when Windows
  3. REM  is running.  If you want to run this, change it appropriately to 
  4. REM  reflect the DOS apps you want to schedule.  Consult your DOS app's 
  5. REM  manual for instructions on how to run your programs from batch files.  
  6. REM    - Enjoy!
  7.  
  8. @echo off
  9.  
  10. :StartWin
  11. c:
  12. cd \win31             REM Run Windows
  13. win /3
  14.  
  15. if errorlevel == 99 if not errorlevel 100 goto Compress
  16. if errorlevel == 98 if not errorlevel 99 goto Backup
  17. Echo:  Standard Exit Windows Procedure - no return codes processed.
  18. goto end              REM If you didn't get 99 or 98 end batch file.
  19.  
  20. :Compress
  21. smartdrv /C           REM Flush SmartDrive
  22. comp.exe              REM This is a disk compression (defragging) program
  23. goto StartWin         REM Restart Windows
  24.  
  25. :Backup
  26. smartdrv /C           REM Flush SmartDrive
  27. tapeback.exe c: /fo   REM Tape backup command line
  28. goto StartWin         REM Restart Windows
  29.  
  30. :end                  REM End of batch file.
  31.