home *** CD-ROM | disk | FTP | other *** search
- @ECHO OFF
- IF "%1"=="" GOTO NoParam
- ECHO The following files will be deleted:
- DIR/W %1
- ECHO .
- ECHO Press Ctrl-C to abort, or
- PAUSE
- ERASE %1
- REM ********** NEW lines begin here **********
- ECHO Deleted "%1" -- now checking results . . .
- IF NOT EXIST %1 THEN GOTO noReadOnlys
- REM To create ^G in the next line, hold Ctrl and press G.
- ECHO
- ECHO At least one file matching "%1" was a Read-Only file
- ECHO and hence was not deleted by the "DEL %1" command.
- :noReadOnlys
- DIR %1 | find "bytes free" > XXXXXXXX.TMP
- COPY XXXXXXXX.TMP YYYYYYYY.TMP > NUL
- DEL XXXXXXXX.TMP
- IF NOT EXIST YYYYYYYY.TMP GOTO end
- DEL YYYYYYYY.TMP
- REM To create ^G in the next line, hold Ctrl and press G.
- ECHO
- ECHO DIR showed you some files matching "%1" that DEL did not
- ECHO delete. Press a key to see files matching "%1".
- PAUSE > NUL
- DIR /W %1
- REM ********** NEW lines end here **********
- GOTO End
- :NoParam
- REM This is the message the internal DEL gives!
- ECHO Invalid number of parameters
- :End