home *** CD-ROM | disk | FTP | other *** search
- @echo off
- :: file DELTREE.BAT runs DELTREE1.EXE that was a renaming of DOS' original
- :: DELTREE.EXE to DELTREE1.EXE. Uses TNT's CHK4ROOT program. Only allows
- :: AUTOMATIC (/Y) root directory wildcard deletions on drive A: and B:
-
- :: below is name of renamed original DELTREE.EXE from DOS
- set dtname=deltree1
-
- if %1y==y goto ok2run
- if %1==/y goto checkit
- if %1==/Y goto checkit
- goto ok2run
- :checkit
- :: got /Y so if root other than drive A: or B: then bad
-
- chk4root /Mw /Q %2
- if errorlevel 255 goto ok2run
- if errorlevel 3 goto norun
- :: here with errlevel at 0,1, or 2 so is either not root or is root of
- :: A: or B: which is ok.
- goto ok2run
-
- :: else not /Y or /y so ok to run
- :ok2run
- %dtname% %1 %2 %3 %4 %5 %6 %7 %8 %9
- goto end
-
- :norun
- echo WARNING! Attempted to auto DELTREE the root of a protected disk drive...
- echo Program aborted by TNT's DELTREE.BAT.
- goto end
-
- :end
- set dtname=