TOOLKIT\DELC.DOC  ·  DOC  ·  2.8 KB  ·  1988-12-01  ·  from PersonalComputing_Dec-1988
                               DELC.EXE
                            by David Foster

DELC is a variation of the DEL command, but with a few extra bits added
for good measure.

DESCRIPTION

In its simplest form, DELC deletes files matching the given filespec,
asking for confirmation of each deletion. In addition to allowing entry
of 'Y' or 'N' to either delete or not, the option to View is available
and, if selected, the first few lines of text are displayed. The
request is then repeated, but More may be selected to view more of the
file. Only printable ASCII characters are displayed. This is
particularly useful when deleting a number of files in a directory as
it allows you to refresh your memory about the contents of the file
before deletion.

Further options, selected with switches on the command line permit
deletion of matching files in sub-directories and also deletion of
files without asking for confirmation. The main use for this last
feature is when the sub-directory option is selected as well, in which
case all matching files will automatically be deleted from the
specified directory and its sub-directories.

SYNTAX

    DELC <filespec> (/S) (/N)

<filespec> is the filename and may contain wildcards, drive letters and
           directory paths.

/S         is an optional switch and causes all sub-directories of the
           specified directories (or if no directory specified -
           Current) to be searched as well.

/N         is also optional and suppresses the prompts for confirmation
           of deletion. When used with the /S switch, this enables
           automatic deletion of files in a number of sub-directories.


EXAMPLES OF USAGE

    DELC

on its own will list the command syntax.

    DELC *.DOC

will offer each file with the suffix '.DOC' in the current directory
for deletion, requesting confirmation of each.

    DELC \MYDIR\*.*

will offer every file in the '\MYDIR' directory for deletion,
requesting confirmation of each in turn.

    DELC \*.BAK /S

will find all occurrences of files with the suffix '.BAK' in the root
directory and all other sub-directories off the root directory,
requesting confirmation.

    DELC \MYDIR\*.ERR /S /N

will delete all files ending in '.ERR' in the '\MYDIR' directory and
all sub-directories off it, without asking for confirmation.

This option is particularly useful for cleaning a hard disk of all
unwanted BAK, ERR etc files before making a backup, or when just
tidying up the hard disk. A batch file containing a series of such DELC
commands will remove all frequently produced files that are no longer
required, with a single batch command.

Note that using '*.*' with the /N switch will always result in a
request for confirmation before deleting all files.