home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. CD ROM (Annual Premium Edition)
/
premium.zip
/
premium
/
DOSUTIL1
/
DEL101.ZIP
/
DELETE.DOC
next >
Wrap
Text File
|
1992-08-24
|
6KB
|
173 lines
DELETE.DOC -- DOCUMENTATION FOR DELETE.EXE
WHAT IS THIS?
DELETE.EXE is an enhancement of the DEL or ERASE internal command that comes
with DOS that:
o allows multiple file specifications on the command line;
o will optionally delete Hidden, System, or Read Only files;
o will optionally prompt for permission to delete any file;
o will optionally delete files in directories below the current one;
o will optionally remove empty directories below the current one;
o will optionally overwrite files before deleting them.
HOW DO I RUN IT?
Syntax:
D:\MPJ\DELETE\DELETE.EXE [switches] [filespec...]
Switches start with / (not -), and are case insensitive.
/? or /H Help: show help message
/F or /Z Force or Zap: delete hidden, system, and read-only files
/G Overwrite eight times, then delete permanently
/O Overwrite once then delete permanently
/P or /C Prompt y/N for Confirmation to delete each file
/Q Quiet: don't display names of deleted files
/R Recursively remove empty subdirectories
/S Recurse through subdirectories but don't remove empty ones
Note: /P cannot be used with /Q.
Note: doesn't ask 'Are you sure?' to delete a directory without /P
For example:
DELETE *.OBJ *.SYM
Deletes all normal files with the suffixes .OBJ and .SYM in the current
directory.
DELETE /P *.*
Presents the name of each file in the current directory to you and asks if you
want to delete it.
DELETE /O C:\PRIVATE\SALARY.LST
PERMANENTLY deletes the file C:\PRIVATE\SALARY.LST.
DELETE /S /P C:\*.BAK
Presents the name of every file on drive C: with a name ending in .BAK to you
and asks you if you want to delete it.
ARE YOU SURE?
The DOS DEL command sometimes asks you if you are sure, and sometimes it
doesn't. If you enter a file specification that isn't *.* or a directory
name, DOS won't ask you permission, even if your file specification matches
all of the files in the directory. A safer approach is to show you the file
name of each file, then ask if you want to delete it, like DELETE does when
you specify the /P option. That is what the DELQ.BAT file does. If you find
the "Are you sure?" prompt to be an annoyance, and like to live a little
dangerously (like I do), then leave the /P switch off. Then you won't be
asked if you are sure, even if you are deleting entire subdirectories.
At the y/N prompt, pressing y or Y will result in the file being deleted or
the directory being removed. Any other key will cause the file or directory
to be left alone.
OVERWRITING
The overwrite options are intended to PERMANENTLY delete sensitive data.
/O Causes one overwrite of the file with the value 34 hex, then the value CB
hex, followed b a verification that the value CB was in fact written over the
file. If the overwrite fails for any reason, the message "OVERWRITE FAILED"
will appear on the screen.
/G Does what /O does four times. This is for the purpose of obliterating a
file beyond the possibility of recovery even with sophisticated lab equipment
that can detect what was overwritten a few times by the strength of the
magnetic fields on the disk.
Either one of these options will cause standard unerase or undelete utilities
to fail, unless you have some TSR operating that defeats the overwrites.
Overwrites occur in 1024 byte blocks, so if you are using a disk cluster size
that is larger, there may be data after the end of a file that does not get
overwritten. Likewise, if you are using a utility that compresses data on
your disk on the fly, the overwriting data will likely be smaller than the
data being overwritten, thus defeating the security of the overwrites. In
most cases, however, if you use one of these options, there is NO WAY to
recover the lost data.
SUGGESTED ALIAS
If you are using DOSKEY, CED, or some similar program, you can override DOS's
DEL function with a command alias, like
DOSKEY DEL=DELETE /P $*
This would be a safer way to delete -- asking you for confirmation with each
file. On the other hand, if you work with data that you need to keep private
on a computer that other people need access to, you may prefer to add the
overwrite option, like
DOSKEY DELQ=DELETE /P /O $*
If you get tired of the y/N prompts, you could leave the /P option out of the
above examples.
RECURSION THROUGH SUBDIRECTORIES
To delete all files in the current directory and all subdirectories below this
one AND to remove all empty subdirectories below this one, use the /R switch:
DELETE /R *.*
To delete specified files in the current directory and all subdirectories, but
remove no subdirectories, use the /S switch:
DELETE /S *.BAK *.BK!
These recursion options should obviously be used with caution, but they can
save you a lot of time when you need them.
DANGER!
Because this program was designed to delete data, you need to watch what you
are doing and not delete anything you don't want to. Be especially careful if
you are using the /Z, /F, /R, /S, /O, or /G options. I recommend the use of
the /P or /C options as much as you can stand it, unless you are sure you know
what you are doing.
WARNING: DELETING THE SYSTEM FILES IN THE ROOT DIRECTORY OF YOUR BOOT DRIVE
WILL MAKE IT INCAPABLE OF BOOTING.
WARNING: ONCE YOU DELETE A FILE WITH THE /O OR /G OPTIONS, THERE IS NO WAY
YOU CAN GET IT BACK WITH ANY UNERASE UTILITY THAT I AM AWARE OF.
REVISION HISTORY
1.01 Minor display formatting changes.
1.00 Initial release.
LEGALITIES
DELETE version 1.01 Copyright (C) 1992 Michael Paul Johnson. All rights
reserved. Even though I am aware of no bugs in this program, it is provided
with no warranty. The user assumes all risk with respect to data loss due to
improper operation or malfunction of this program. However, if you find a
bug, please tell me so I can fix it.
Shareware: to register & get an original disk with this and other programs on
it, please send $20 & the name of this program to:
Mike Johnson
PO BOX 1151
LONGMONT CO 80502-1151
USA
Support for registered users via Rainbow Missions BBS 303-938-9654