Contents of the ARCSWEEP.DOC file
Redundant File Deletion Utility
2500 Larch Rd. #58
Quincy, IL 62301
If you are like I am, and download a number of .ARC files into a single direc-
tory and then "un-arc" to see what's in them; eventually you will end up with
a lot of files that you don't know what to do with. Without painstakingly gen-
erating a list of files included in an archive and then matching each of them
up with "loose" files on the disk, there is no way of telling which files you
can safely delete while still ensuring there is a copy in the archive. In des-
peration, I finally wrote ARCSWEEP to help me with my disk cleaning chores.
ARCSWEEP takes as an argument either a single .ARC file name, or a global
"*.ARC" command to process all archive files in the current directory;
As the archive file is processed, a list is developed of the contents of the
archive and is compared with the loose files in the directory. When a file is
found that matches the filename, file date, and file time of the file contained
in the archive, ARCSWEEP will then query whether to delete the file. Responding
"Y" will result in the redundant file being deleted and processing continuing
to the next file in the list. If any discrepancy is found in either the name,
date, or time of the file as compared to that stored in the archive, the file
will NOT be deleted; thereby protecting files that might inadvertantly carry
the same filename (such as READ.ME).
If you wish processing and deleting to take place without your verification of
each deletion, you can enter the ARCSWEEP command with the option switch /nv;
which stands for No Verify. For example:
ARCSWEEP filename.ARC /nv
ARCSWEEP *.ARC /nv
This will cause ARCSWEEP to delete all matching files without prompting you for
each one. As above, only filed determined to be the same as those contained in
the archive will be deleted.
At any time within the program, you can abort the operation simply by pressing
Ctrl-C. The program will then terminate at the end of the current process.
ARCSWEEP was originally written in QuickBASIC version 4.0 and measured 44K in
size. I decided that I would use this program as a means of "getting my feet
wet" with Turbo C; this being my first real attempt at a C program. While it
took me nearly 3 days to rewrite this program; I am very pleased that I did;
because not only did I discover that I indeed could write a C program (some-
thing I was beginning to doubt), but the resultant code size went from 44K to
less than 10K.
I am including the source code for ARCSWEEP (at the risk of embarrassing myself
in front of the programming world) to demonstrate the means of reading the
list of files contained in an archive. This was a discovery to me, and I hope
someone else can get some use of it as well. To you veteran C programmers;
please try not to laugh too hard at my code! Remember, everybody has to start
This program is released into the Public Domain and may be used without restric-
tion by any party.