FILE DELETION UTILITY (Version 1.1) NAME: DELCLEAN *************************************************************** * * * Version 1.1 Features * * * * * You can interrupt execution with any keystroke * * * * * You receive more feedback and clearer messages * * during execution * * * * * -F option mirrors execution of your request without * * doing it (so you can preview its consequences) * * * * * -G option creates a log file which fully records * * execution of your request * * * * * -O option overrides the Read Only file attribute * * so that you can delete such files * * * * * -P option directs program to a "parameter file" * * containing most/all parameters for current run * * (so you don't have to constantly retype long, * * commonly used DELCLEAN specs!) * * * *************************************************************** DESCRIPTION: DELCLEAN deletes selected files and/or directories on a specified drive. It can optionally: * Search for wildcard-delimited files and/or directories on your entire drive, on the current directory and all subordinate directories, or just on the current directory * Confirm all deletions before executing them (giving you a last chance to change your mind!) * Delete all found files and/or directories (including Read Only files if that option is specified) * "Clean" deleted confidential files (ie, prevent their recovery via UNERASE or UNDELETE) FORMAT: DELCLEAN [Parm] [Parm] [Parm] [\Path1\]Fn1.Fx1... [Parm] [Parm] [Parm] [\Pathn\Fnn.Fxn] Where... Parm [optional] is a parameter. You can specify up to seven parameters with each Path\Fn\Fx spec. See detailed explanation below. \Path1\ [optional] is the complete path of the first file or directory to be located and deleted. If no path is given, the current directory is assumed. Fn1.Fx1 is the name and extension of the first file or directory to be located and deleted. Wildcards can be used as delimiters. \Pathn\ [optional] is the path, name and extension of each Fnn.Fxn additional file or directory to be located and deleted. PARAMETERS Each parameter has three parts: * a dash (-) * the parameter type (C, F, G, L, O, P, S) * an on/off indicator (C, F, L, O, S) OR an associated file that you specify (G, P) (For example: -SON, -COFF, -L\DIR1\TEST.LOG) PARAMETER If Parameter is ON If Paramter is OFF ---------------------------------------------------------------- C Confirms all deletions Automatic execution prior to execution F Mirrors execution without Automatic execution doing anything G Creates a log file that No log file records execution L "Cleans" file (makes it No cleaning unrecoverable even using UNERASE or UNDELETE) O Overrides Read Only byte No deletion of Read (deletes Read Only files) Only files P Gets parameters for run You must specify all from file you specify parameters S Searches current AND Searches only current subordinate directories directory IMPORTANT: All options except 'C' are OFF by default. You only specify options to change these settings. Parameter settings remain active for current run of DELCLEAN unless you change them (see example 5). NOTES: During execution, DELCLEAN lists the name of each file or directory that it is deleting. It also states the cumulative number and size of all deleted items. You can interrupt DELCLEAN any time during execution by pressing any key. If you respond 'Y' to the confirmation message which appears, processing for the current run terminates. If a DIRECTORY meets specified name/extension criteria, that directory PLUS all files and/or directories in it are deleted! This "cascading delete" feature is very powerful, but you should use it cautiously. Have 'C' or 'F' on to learn what DELCLEAN will delete BEFORE it does it! On the other hand, a directory will NOT be deleted unless it meets the search criteria. This is true even if DELCLEAN deletes all files in a directory because they DO meet search criteria (leaving an empty directory). EXAMPLE 1 DELCLEAN SOMEFILE.BAT This searches the current directory for SOMEFILE.BAT. If the file exists and is not Read Only, a confirmation message appears. If you respond 'Y', the file is deleted but not cleaned. EXAMPLE 2 DELCLEAN -COFF -FON -OON -LON ANYFILE.* This searches the current directory for all files named ANYFILE. It then "fakes" deletion and cleaning of all files so you can see which files will be affected IF you execute this command. (To actually delete and clean these files, press F3, type '-FOFF' to turn the Fake option off, and then press Enter.) EXAMPLE 3 DELCLEAN -SON -COFF -OON DUPE*.* This searches the current directory--and all subordinate directories--for files which begin with DUPE. It then automatically deletes but does not delete those files. EXAMPLE 4 DELCLEAN -SON C:\UTILSDIR This searches the entire C drive for directories named UTILSDIR. It then confirms total directories AND files within those directories found. If you respond 'Y', all directories and files are deleted. EXAMPLE 5 DELCLEAN -SON -OON -LON C:\DIR1\*.BAK -COFF D:\*.BAK This searches the DIR1 directory--and all subordinate directories on your C drive--for files with an extension of BAK. It then confirms total files found. If you respond 'Y', it deletes and cleans those files. Finally, it searches the entire D drive for .BAK files and automatically deletes and cleans those files. (Note: No confirmation message appears since that parameter has been turned off: -COFF). EXAMPLE 6 DELCLEAN -SON -LON A:\*.TXT -LOFF EXTRA.CPY This searches your A drive for files with an extension of TXT that are not Read Only. It then confirms total files found. If you respond 'Y', it deletes and cleans those files. Finally, it deletes (but does NOT clean) file EXTRA.CPY on the current directory. EXAMPLE 7 DELCLEAN -P\DIR1\PARM1.FLE ANYFILE.BAT This searches DIR1 for PARAMS.FLE which contains parameters. It then executes DELCLEAN which uses those parameters to delete ANYFILE.BAT. EXAMPLE 8 DELCLEAN -P\DIR1\PARM2.FLE This is like example 7 except that file PARM2 also includes specs for the file(s) to be deleted. EXAMPLE 9 DELCLEAN -SON -LON -L\LOG.FLE *.BAK This searches the current directory --and all subordinate directories--for all .BAK files. It then deletes and cleans them. It also records the current run in LOG.FLE so that you can easily review what was done later. ************* This section goes at beginning of DELCLEAN.PAS *************** Writeln ( 'DELCLEAN deletes selected files and/or directories on a' ); Writeln ( 'specified drive. It can optionally:' ); Writeln; Writeln ( 'PARAMETER If Parameter is ON If Paramter is OFF' ); Writeln ( '--------------------------------------------------------------'); Writeln; Writeln ( ' C Confirms all deletions Automatic execution' ); Writeln ( ' prior to execution' ); Writeln; Writeln ( ' F Mirrors execution without Automatic execution' ); Writeln ( ' doing anything' ); Writeln; Writeln ( ' G Creates a log file that No log file' ); Writeln ( ' records execution' ); Writeln; Writeln ( ' L "Cleans" file (makes it No cleaning' ); Writeln ( ' unrecoverable even using' ); Writeln ( ' UNERASE or UNDELETE)' ); Writeln; Writeln ( ' O Overrides Read Only byte No deletion of Read' ); Writeln ( ' (deletes Read Only files) Only files' ); Writeln; Writeln ( ' P Gets parameters for run You must specify all' ); Writeln ( ' from file you specify parameters' ); Writeln; Writeln ( ' S Searches current AND Searches only current' ); Writeln ( ' subordinate directories directory' ); Writeln; Writeln ( ' IMPORTANT: All options except 'C' are OFF by default.'); Writeln ( ' You only specify options to change these settings.' ); Writeln ( ' Parameter settings remain active for current run' ); Writeln ( ' of DELCLEAN unless you change them.' ); Writeln; Writeln; Writeln ( 'FORMAT: DELCLEAN [Parm] [Parm] [Parm] [\Path1\]Fn1.Fx1...' ); Writeln ( ' [Parm] [Parm] [Parm] [\Pathn\Fnn.Fxn]' ); Writeln; Writeln ( 'EXAMPLE: DELCLEAN -SON -LON C:\ANYFILE.*' ); Writeln;