A Very Cool Utility (CAD Manager's Toolbox)23 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 http://www.cad-manager.com/tools 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:
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 email@example.com, and you might get a cool Cadalyst souvenir if I use your idea.
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor and Autodesk Technical Evangelist Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD video tips. Subscribe to the free Cadalyst Video Picks newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!