home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
d
/
deldir22.zip
/
DELDIR.TXT
< prev
next >
Wrap
Text File
|
1993-01-25
|
5KB
|
113 lines
DELDIR v2.2 by Emmanuel Verbeeck.
Object:
Removes several non-empty directories (and their subdirectories).
Can also remove at once several files/directories specifications
recursively, selectively, regardless of readonly/hidden/system
attributes, and wipe confidential data so that it is unrecoverable.
Operates in both interactive and batch modes, handling exclusion
masks, hardware faults, and break requests.
Syntax:
DELDIR [wildcards...] [/options...]
Wildcards:
[d:][\path]name[.ext] = files/directories to delete
@[d:][\path]name[.ext] = file containing a list of files/dirs to delete
#name[.ext] = files/directories to exclude
Options:
/A = (files only) Ask for confirmation before each removal;
/B = (all) Beep on errors;
/C = (dirs only) Count files deleted in each directory;
/D = (all) Disable CTRL-C and CTRL-BREAK during processing;
/E = (all) bypass Environment variable DDOPT=... reading;
/F = (all) display messages in French instead of English;
/H = (all) display this Help page (use >PRN to print it);
/I = (all) Ignore hardware errors (useful in batch files);
/K = (dirs only) Keep directory structure, just remove contents;
/L = (lists only) listfile is deleted after being processed;
/M = (all) be Mute, don't report anything even errors;
/N = (all) save the current parameters by setting DDOPT;
/O = (all) Only process files and ignore directories;
/P = (all) Pause when the screen is full;
/Q = (all) be Quiet, don't report items removed;
/R = (all) only process diRectories and ignore files;
/S = (files only) also delete files in Subdirectories;
/V = (files only) Verify that files are correctly deleted/wiped;
/W = (files only) Wipe files instead of deleting them (very dangerous);
/X = (files only) eXclude files created or modified since last backup;
/Y = (all) display short syntax summarY (use >PRN to print it);
/Z = (files only) exclude hidden and system files.
Notes:
Wildcards are accepted (eg P* means all entries beginning with P);
Several directories can be specified (eg DELDIR \utils c:\games);
Filenames can also be specified (eg DELDIR c:\*.bak d:\testdir);
Specifying just a drive letter (eg A:) will delete the whole volume;
Several options can be combined (eg type /bcp instead of /b /c /p);
Options can be either upper- or lowercase (eg /c is equal to /C);
Options can start with '-' instead of '/' (eg -p is equal to /p);
Exclusions can be specified using #mask (eg #*.ok will skip .OK files);
Defaults can be set via the DOS variable DDOPT (eg SET DDOPT=af);
Warnings:
Using DELDIR C:\*.* /DW would completely *wipe* your harddisk!
You should always combine /W (wipe) with /A (ask for confirmation).
Unless /Z, system, hidden and read-only files are not protected!
Drive and/or paths are not allowed in #exclusions.
The /N option is not 100% foolproof; for compatibility use SET DDOPT=...
This program does a self-test for infection/hacking at startup.
DELDIR returns an ERRORLEVEL value (0 through 255) composed as follows:
no bit set ( 0) = process ran fine;
1st bit set ( 1) = file attributes could not be cleared;
2nd bit set ( 2) = a wrong parameter had been specified;
3rd bit set ( 4) = a directory or file does not exist;
4th bit set ( 8) = access to a file had been denied;
5th bit set ( 16) = DELDIR.EXE has been modified or renamed;
6th bit set ( 32) = the current directory had been specified;
7th bit set ( 64) = a directory could not be removed (run CHKDSK);
8th bit set (128) = a file could not be deleted (run CHKDSK).
Examples:
DELDIR \tmp \temp -r : delete directories \TMP and \TEMP of the
current drive, ignoring files named
TMP. or TEMP. in the root.
DELDIR \*.bak \*.old -s -af : delete all .BAK and .OLD files
throughout the current drive,
requesting confirmation in french.
DELDIR d:\docs\???.doc /WXSQ : wipe all three-letters .DOC files in
D:\DOCS and under, except the new ones,
and don't display anything but errors.
DELDIR a: /i/e/d #*.cpp : delete whole diskette in A:, except the
C++ files, ignoring DDOPT, hardware
faults and user interruptions.
About...
This program is freeware, it can be freely copied and used without any
restrictions. I hope you appreciate its versatility and many options.
DELDIR is written in Borland C++ v3.0. It has been tested under DR-DOS
(5.0 and 6.0), MS-DOS (3.3, 4.01 and 5.0) and NetWare (2.15 and 3.11).
Please report bugs and suggestions, likes and disklikes, to:
Emmanuel Verbeeck,
32 Bvd de la Cambre, bte 58,
1050 Brussels,
Belgium, EUROPE.
You can join me on CompuServe at [100010,3700] and on MCI Mail at 568-9552