A Very Cool Utility (CAD Manager's Toolbox)

22 Jul, 2008 By: Robert Green

One simple DOS program can automate the cleanup of network servers.

In the last edition of the CAD Manager's Toolbox, I talked about periodic deletion of files from network servers to prevent clutter and keep things nice and clean. I received several reader responses asking for ways to make more powerful cleaning routines, so in this edition I'll show you a cool little DOS utility that I use to automate the process.

I've been using a utility called SWEEP.EXE for a while now with great results. SWEEP.EXE allows you to process DOS commands throughout entire directory structures, thus making it great for cleaning servers using batch files.

Now I know that not everyone knows DOS these days, but the venerable old system can still do some things very well. Let me illustrate how the process might work:

Step 1. Download SWEEP v1.62 from my Web site at and extract its files.

Step 2. Place the SWEEP.EXE file in your Windows\System32 path like this:

Placing the utility in your SYSTEM32 folder assures that SWEEP.EXE can always be found by the system.

Step 3. Verify operation of SWEEP.EXE by typing SWEEP at a DOS prompt like this:

Click for larger image
Invoking SWEEP at the Command line shows all the supported options. (Click image for a larger version)

Step 4. Read through the command prompt options and issue a command. Let's say you wanted to delete all BAK files, MP3 files, and TMP files from the network drive called R:

The DOS command lines would look like this:

SWEEP -ir del *.bak;del *.mp3;del *.tmp

Where the R: command switches the current drive to R and the SWEEP syntax executes all three delete commands through the entire directory structure of the R drive.

You can do a lot more with SWEEP.EXE as you read through the options, but just using it in the way I've described makes it a very useful utility. This tool is offered free from Robert Briggs, but contributions for this great file management tool are gladly accepted by the author and instructions for doing so can be found in the documentation that comes with the utility.

Do you have a suggestion/tip that should be in the CAD Manager's Toolbox? Send it to me at, and you might get a cool Cadalyst souvenir if I use your idea.

About the Author: Robert Green

Robert Green

More News and Resources from Cadalyst Partners

For Mold Designers! Cadalyst has an area of our site focused on technologies and resources specific to the mold design professional. Sponsored by Siemens NX.  Visit the Equipped Mold Designer here!

For Architects! Cadalyst has an area of our site focused on technologies and resources specific to the building design professional. Sponsored by HP.  Visit the Equipped Architect here!