-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

DELETE.DOC -- DOCUMENTATION FOR DELETE.EXE


WHAT IS THIS?

DELETE.EXE is a Win32 console application that deletes files. Win32
Console application means that it runs in a Windows 98, ME, 2000, or XP
command prompt. It is an improvment over the DEL or ERASE internal
command that comes with the operating system. Delete's features include:

    o allows multiple file specifications on the command line;

    o optionally deletes Hidden, System, or Read Only files;

    o optionally prompts for permission to delete any file;

    o optionally deletes files in directories below the current
      one;

    o optionally removes empty directories below the current one;

    o optionally overwrites files before deleting them; and

    o optionally deletes only files dated before, after, or between
      dates.

    o optionally deletes only zero length files.

    o optionally deletes only files that are not present in a
      reference directory (useful for mirroring a directory
      structure when used with Xcopy).

DEL16.exe is the old DOS version of this program that runs under pure
DOS, and can't see long file names.


HOW DO I RUN DELETE?

Syntax:
%s [switches] [filespec...]
Switches start with / (not -), and are case insensitive.
  /? or /H Help: show this message
  /Amm-dd-yyyy /Add.mm.yyyy delete files dated on or after date
  /An delete files dated on or after n days ago (n is a number)
  /Dmm-dd-yyyy /Ddd.mm.yyyy delete files dated on or before date
  /Dn delete files dated on or before n days ago (n is a number)
  /G Overwrite eight times, then delete
  /Mdirectory Delete files only if they are Missing from
     specified directory
  /N Null files only -- delete only if zero length.
  /O Overwrite twice then delete
  /P or /C Prompt Y/N to Confirm delete each file
  /Q Quiet: don't display names of deleted files
  /R Recursively delete files here & in subdirs;
     remove empty subdirectories
  /S Recurse through subdirectories but don't remove empty ones
  /Z or /F Zap or Force: delete hidden, system, and read-only files also

Note: /P cannot be used with /Q.
Note: doesn't ask \"Are you sure?\" to delete a directory without /P

File specification wildcard pattern matching is done the same way the
operating system does it. Therefore DELETE interprets "*" as "all files"
and DEL16 interprets "*" as all files without an extension.

If a file specification or directory name includes one or more spaces,
enclose it in quotes.

Dates for /A or /D can use /,-, or . to separate the month, day, and
year. If you use . to separate the parts of the date, the European
convention of day.month.year is used.  If you use only two digits for
the year, the date is assumed to have the same first two digits as the
current year. For example, 02 in 2004 means 2002, but 02 in 2104 means
2104. /A and /D can be used together, but if the "after" date is before
the "before" date, nothing will be erased. This program is designed to
handle all file dates between the years 1980 and 3000, although it is
likely that some changes in the operating system will cause problems in
this program before that end date.

The /M option is for use with "hot standby" systems where you want to
periodically delete all files from a backup drive that are not present
on the primary drive.  For example, if the backup drive letter is G: and
the primary drive letter is D:, you might type the command:

DELETE /S /MD:\ G:\*
to delete all files on drive G: that don't exist on drive D:.

DELETE /R /D7 "/MC:\My Documents" "Z:\Users\Fred\My Documents\*"
deletes all files in Z:\Users\Fred\My Documents that don't exist
in C:\My Documents and which were last written to more than one week
ago.

Some other examples:

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.  Y or y cause the file to be deleted, Esc or
Ctrl-C cause the program to exit, anything else skips the file.

DELETE /O C:\PRIVATE\SALARY.LST
PERMANENTLY deletes the file C:\PRIVATE\SALARY.LST such that no standard
data recovery techniques are likely to work, nor would most laboratory
data recovery services be able to recover the data.

DELETE /G CLASSIF.IED
PERMANENTLY deletes the file CLASSIF.IED beyond recovery even with
sophisticated laboratory techniques. Note that this program does not
delete "unused" space or system areas on disks, so it cannot be used to
completely declassify a hard disk. To wipe totally unused clusters,
please use the companion program called "ZAP".  This option should
appeal to the clinically paranoid who don't care that it takes a while
to get the file(s) erased.

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.

DELETE /D10-1-1993 *.LOG *.BAK
Deletes all files with a suffix of .LOG or .BAK modified on or before
October 1, 1993.

DELETE /A10-1-1993 /D10-31-93 *
Deletes all files in the current directory dated during October, 1993.

DELETE /A23 *
Deletes all files in the current directory dated 23 days ago or later.

DELETE /D180 *
Deletes all files in the current directory dated 180 days ago or
earlier.

DELETE /N /S D:\PROJECT\*
Deletes all files in the D:\PROJECT directory and its subdirectories
that are of zero length.


ARE YOU SURE?

The operating system 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 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 cryptographic pseudorandom
values, then the one's compliment of those values, followed by a byte
for byte verification that the correct values were in fact written over
the file.  If the overwrite fails for any reason, the message "OVERWRITE
FAILED" will appear on the screen.  After each of the write operations,
_flushall() function is called in hopes that this will prevent write
delay cache programs from defeating the overwrite. This may not be
effective. For greater assurance of an overwrite, use ZAP.EXE. This
option also sets the file size to zero after the last overwrite and
deletes the name in the directory entry (once).

/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. /G is
inspired by certain U. S. Government requirements for deletion of
certain very sensitive data. The truly paranoid can increase this value
by specifying a number from 5 to 9 immediately after the /G to specify a
greater number of overwrite pairs.

For example, to overwrite the file "SECRET.DOC" (containing the recipe
for nerve gas or some such noxious thing, perhaps?) 18 times (9 pairs of
overwrites), so that it cannot be unerased by spacefaring aliens with
sensitive magnetic analisys instrumentation:

DELETE /G9 SECRET.DOC

Either one of the above two options (/G or /O) will cause standard
unerase or undelete utilities to fail, unless you have some TSR
operating that defeats the overwrites.  Some network operating systems
that keep old versions of overwritten files may defeat the effectiveness
of the overwrites.  If you are not running any software designed to make
deleted files recoverable, /O will obliterate data beyond the ability of
commercial data recovery services to recover, and /G will obliterate the
data beyond the ability of well-funded spy organizations to recover.
Keep in mind, however, that the data you are overwriting may also exist
in other places, such as already-deleted temporary files or swap files,
or on backup tapes or disks.

The pseudorandom sequence generator used is the Sapphire II Stream
Cipher, keyed with an obscure combination of things available in the
environment of the PC. It would not be impossible to reproduce the
sequence used, but it would take some effort and guesswork to do so. A
different sequence is used for each pair of overwrites.

More resistance to undeletion comes with overwriting the data, but
renaming the file to a one character name, then truncating it to zero
length even removes clues about what file name was deleted and how long
it might have been when using standard unerase or undelete utilities.


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.


SYNCHRONIZING HARD DISKS

When maintaining a disk image backup with a utility like Master Copy
(MCP) for DOS or the 32-bit version of XCOPY, it is sometimes necessary
to delete the files on the backup volume that don't exist on the master
volume. This is easily done with the /M option.  For example, if you
back up your local hard disk, C:, to a network file server directory
F:\LOCALBKP\FRED\ with XCOPY, want to delete files on the network server
that you have deleted on your local hard disk and that are dated more
than 3 days ago with the commands:

DELETE /D3 /R /MC:\ F:\LOCALBKP\FRED\*
xcopy /c /r /e /i /d C:\* F:\LOCALBKP\FRED\

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 option as much as you can stand
it, unless you are sure you know what you are doing. You should also
test this program on a system similar to yours with no valuable data on
it to make sure that it does what you want it to do.

WARNING:  DELETING THE SYSTEM FILES IN THE ROOT DIRECTORY OF
YOUR BOOT DRIVE OR IN YOUR OPERATING SYSTEM DIRECTORY WILL MAKE IT
INCAPABLE OF BOOTING OR CAUSE OTHER UNDESIREABLE SIDE EFFECTS.

WARNING:  ONCE YOU DELETE A FILE WITH THE /O OR /G OPTIONS, FILES CAN'T
BE UNERASED UNLESS THERE IS SOME UTILITY RUNNING THAT SAVES ALL
INTERMEDIATE VERSIONS OF FILES WHEN THEY ARE OVERWRITTEN.

WARNING:  CERTAIN NETWORK OPERATING SYSTEMS AND TSR-BASED GUARANTEED
UNDELETE UTILITIES MIGHT DEFEAT THE EFFECTIVENESS OF OVERWRITE OPTIONS.

LEGAL NOTICES

DELETE version 2.10 Copyright (C) 1992-2002 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. This is
shareware.  You are free to copy and distribute without modification for
the purpose of evaluation. If you decide to use this program for more
than 90 days, you are required to register it.


REGISTRATION FEES

Single copy registration: $25.

Site license registration, unlimited copies for use at the
same corporation:  $249.

Please send registration fee and the name of this program to:

        Michael Paul Johnson
        PO BOX 275
        MESA CO 81643-0275
        USA


HOW TO CONTACT THE AUTHOR

1.  Email: mpj@eBible.org

2.  Paper mail at the above address

3.  Contact information at http://eBible.org/mpj/

4.  Paper mail at my overseas address:

        Michael Paul Johnson
		SIL BOX 421
		UKARUMPA EHP 444
		PAPUA NEW GUINEA

5.  Telephone in Papua New Guinea 011+675+737-4519


REVISION HISTORY

 6 Jul 02  2.10  Fixed problem in recursive directory deletion that
                 affects Windows NT, 2000, and XP.
				 Updated file date handling functions to support file
				 dates from 1980 through 3000. (The previous version
				 failed in the year 2038.)

20 May 99  2.00  Ported to Win32 console environment.

25 Nov 96  1.21  Fixed bug that caused overwrite failures when
                 deleting multiple files.

 3 Jul 95  1.20  Made directory removal respond to the /A, /D,
                 and /M options in the same way as file erase.

10 Jun 95  1.12  Fixed a bug affecting the /Ddd.mm.yyyy option
                 where incorrect files were selected.

 4 Jun 95  1.11  Fixed bug where a command line option following
                 a relative number of days might not be seen if
                 there was no space between the options.

16 May 95  1.10  Added /M option.

 9 Feb 95  1.06  Added code to set the file length in the
                 directory to zero after overwriting but before
                 deleting a file when using /O or /G options.

 5 Feb 95  1.05  Added number of day option for /A and /D
                 switches.  Changed support BBS to Colorado
                 Catacombs, 303-772-1062.  Improved secure
                 overwrite to use cryptographic stream instead
                 of "random()" function.  Added /N option.

24 Feb 93  1.04  Made overwrite pattern pseudorandom for more
                 secure overwrite and erasure on compressed
                 volumes.

 2 Oct 93  1.03  Added /A and /D switches.

 6 Feb 93  1.02  Added disk reset function.  Made Ctrl-C & Esc
                 exit program at y/N prompt.  Increased depth
                 of directory recursion possible.

24 Aug 92  1.01  Minor display formatting changes.

29 Apr 92  1.00  Initial release.



                              INVOICE

Remit to:                                 From:

Michael Paul Johnson                      ______________________

PO BOX 275                                ______________________

MESA CO 81643-0275                        ______________________

USA                                       ______________________


                                          Contact person:

                                          ______________________

                                          ______________________

                           email address: ______________________


Quantity  Description                       Unit Price    Total

          
________  DELETE single copy registration    $25.00       ______


          Site license for unlimited use
________  of DELETE at one corporation      $249.00       ______

                                      Sales Tax (CO only) ______

                                              Total       ______


Note that the DELETE 2.1 software has been delivered electronically and
accepted by the customer. 

SHA1SUM fingerprints (get ftp://eBible.org/pub/sha1sum.zip to
verify):

SHA1=35E977B904F10F80C18AEAB3786D6750C19B3AD8 DEL16.EXE
SHA1=56D5232A7DD1F1D31BCF6BD0ED2DAB34C3D7699C Delete.exe
SHA1=B41CCC47C28BBC9AA1304F652D0AB89078421E20 DELQ.BAT
SHA1=2372C7CB4D5309A753CEA921111793F5A53788A0 FILE_ID.DIZ
SHA1=50763BCFFCD7226CD8A8F87A21C3FCB75D545B8B Register.txt
SHA1=0623BDF3A2BBD902598AEC9498B95A4E52B40577 pad_file.xml

MD5SUM fingerprints (get ftp://ebible.org/pub/public/md5sum.zip to
verify):

6d66dd347e65c3970e9428aa0b220f9c *DEL16.EXE
a859c861989658b140c72edc714975d7 *Delete.exe
b32f7615807bb25fd087c2d2aab0b7f0 *DELQ.BAT
15c0bf8b025de6adf2ddfc4497ca718f *FILE_ID.DIZ
35151d71fd9d1770479ddb95b430d9b3 *Register.txt
643981a8c8ab42eb4503a37f84295632 *pad_file.xml



-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com>
Comment: http://eBible.org/mpj/

iQA/AwUBPSo/+USP4McX10e7EQIHeACg1Slu3rSboMK7Y7s8/vIrCwbsH7UAoO22
bcMlhFAbc+GO7nrSk1KmpY75
=E2Ap
-----END PGP SIGNATURE-----
