home *** CD-ROM | disk | FTP | other *** search
/ Beijing Paradise BBS Backup / PARADISE.ISO / software / BBSDOORW / DELTREE.ZIP / DELTREE.BAT < prev    next >
Encoding:
DOS Batch File  |  1994-05-19  |  931 b   |  34 lines

  1. @echo off
  2. :: file DELTREE.BAT runs DELTREE1.EXE that was a renaming of DOS' original
  3. :: DELTREE.EXE to DELTREE1.EXE.  Uses TNT's CHK4ROOT program.  Only allows
  4. :: AUTOMATIC (/Y) root directory wildcard deletions on drive A: and B:
  5.  
  6. :: below is name of renamed original DELTREE.EXE from DOS
  7. set dtname=deltree1
  8.  
  9. if %1y==y goto ok2run
  10. if %1==/y goto checkit
  11. if %1==/Y goto checkit
  12.     goto ok2run
  13. :checkit
  14.     :: got /Y so if root other than drive A: or B: then bad
  15.     
  16.     chk4root /Mw /Q %2
  17.     if errorlevel 255 goto ok2run
  18.     if errorlevel 3 goto norun
  19.     :: here with errlevel at 0,1, or 2 so is either not root or is root of
  20.     :: A: or B: which is ok.
  21.     goto ok2run
  22.  
  23. :: else not /Y or /y so ok to run
  24. :ok2run
  25.     %dtname% %1 %2 %3 %4 %5 %6 %7 %8 %9
  26.     goto end
  27.  
  28. :norun
  29. echo WARNING!  Attempted to auto DELTREE the root of a protected disk drive...
  30. echo Program aborted by TNT's DELTREE.BAT.
  31. goto end
  32.  
  33. :end
  34.     set dtname=