[ Go to March 1997 Table of Contents ]|
Binary Bloat And Digital Dust Bunnies
Here's a radical, no-reformat way to clear the digital debris that's probably wasting a huge hunk of your hard drive.
They're in there, lurking in the corners of your hard drive: forgotten and duplicate files, mystery DLLs, unused applets, sample and "temporary" files that somehow became permanent. The more software you use, the more Web pages you visit, the more demos and shareware you try, the worse it gets. Over the course of a year, these digital dust bunnies can occupy a staggering amount of space.
How much space? Well, I experimented with a radical, no-reformat cleanup process on what I thought was a pretty clean 2.1GB system, and managed to free up nearly 600MB. Perhaps I'm an extreme example, but chances are you, too, can recover a decent amount of space from your drive, even if you think it's already reasonably clean.
I tried a shortcut cleanup because I dreaded what had become an annual ritual: backing up my files, reformatting the hard drive, reinstalling Windows and all my applications and then restoring my data files. This kind of grand mal housecleaning is the safest and surest method of getting a fresh start with Windows (see Optimizing Windows, December 1996). Trouble is, as John Woram noted in his column, a full-blown reformat and restore is a laborious process. If you have a large hard drive with lots to restore and a relatively slow backup medium, the process can eat up an entire day.
So I tried a shortcut that lets you do a full Windows delete and restore-even to the point of putting fresh boot files on your hard drive-while leaving your data files untouched. I wouldn't recommend this to everyone (John's method is safer and surer), but if you know Windows and your system well and you follow the steps outlined here, your chances of success are very high. Let me walk you through it.
First and foremost, you need a full, verified system backup. You should have this anyway, so it shouldn't be a hardship. But this time, use your backup software to get a jump on freeing up space: Move little-used applications or data into offline storage. I have more than 100MB of old e-mail files residing safely in archive tapes.
Next, make sure you have the original installation disks and registration codes for all your programs. If any of your system software or hardware relies on unusual settings and configurations, keep that information at hand as well, so you can easily restore things later.
Now create and test a boot diskette. The Startup Disk function in Control Panel's Add/Remove Software applet can get you started, but it often creates boot disks that don't let you access your CD-ROM drive or network. If you need either of these to reinstall Win95, you'll have to track down the DOS-level files you need and add them to the boot floppy, modifying the floppy's AUTOEXEC and CONFIG files appropriately.
Though your system needs may differ, my boot floppy CONFIG.SYS is simple, with just HIMEM.SYS and my CD-ROM system drivers. My AUTOEXEC.BAT is even simpler, with just MSCDEX.EXE. If you need to add many files, you may have to delete some of the Startup Disk files, but try to leave as much of the Startup Disk intact as possible. At a minimum, be sure to leave FDISK, FORMAT and SYS. If you're really tight on space, make a two-floppy boot set: a standard Startup Disk and a separate disk with the other files you need.
No matter how you set things up, your boot floppy must give you access to all the hardware and software you need to restore Windows, and must be completely self-contained. And the AUTOEXEC and CONFIG should call only for items on the floppy.
Beyond basic booting
To turn a basic Startup Disk into a powerful cleanup tool, copy DELTREE.EXE from the WINDOWS/COMMAND directory and-optionally-SMARTDRV.EXE from the WINDOWS directory (your locations may differ). DELTREE is a powerful (and potentially dangerous) DOS-level application that wipes out entire sections of your directory structure, starting wherever you specify and methodically deleting every file and subdirectory from that point downward. SMARTDRV is a disk cache that isn't essential for cleaning a hard drive, but will make DELTREE run much faster. (Note: SMARTDRV requires HIMEM to load.)
Now you're ready for some serious weed-whacking. From within Win95, manually delete any files you don't need. Don't worry about files in the WINDOWS or PROGRAM FILES directories; we'll take care of those in a moment. Start by using Win95's Find function to search and destroy all TMP, BAK and similar file types. You can also use Find's Date Modified tab to search and destroy files you haven't touched in a long time. Be ruthless-if you cut something you need, you can restore it later.
Before you leave Windows, if you're using disk compression (such as DriveSpace), make sure your Host Drive has at least a couple of megabytes free. If necessary, use your disk compression tool to increase free space.
When you're done, empty the Recycle Bin, shut down Windows and restart your system with the boot diskette in place.
Here comes the fun part: From the command line, type SMARTDRV to load the caching software, then type DELTREE /Y C:\WINDOWS C:\PROGRA~1 and go get a cup of coffee. The /Y means DELTREE will doggedly slog through both directory trees and wipe out every file, then delete the directories themselves. But unlike FORMAT, DELTREE will touch only the specified directories and files: All your data files in other directories will remain untouched and intact.
When DELTREE is done, type SYS C: to place fresh system files on the C: drive, and copy the contents of your boot diskette to the C: directory, overwriting any similarly named files on the hard drive. If your C: drive is compressed, target the Host Drive as well. In my case, I also type SYS H: and then COPY A:\*.* H:\.
Now remove the floppy and reboot from your hard drive. The system should wake up and run from the hard drive. You can now reinstall Windows, any patches or updates you need, and your application files. Your old WINDOWS and PROGRAM FILES directories are gone, so reinstall Windows from scratch for a clean, virgin setup. But your data files are still there on the hard drive, just where you left them and in your familiar directory structure.
When everything's back in place, defrag your hard drive (and recompress it, if you're using compression), and then sit back and enjoy the elbow room you've created.
The amount of space you'll free up depends on a host of variables, but no matter how much space you've lost, this shortcut cleanup will help free it up in one giant step.
I've focused on disk space, but there's another benefit: As John Woram pointed out, Windows itself may run better when installed afresh. More space and better-running Windows. What a deal!
Can things go wrong? That's always possible. But your complete and verified system backup is a reliable safety net.
You may not need a new hard drive after all-just sweep out those digital dust bunnies and see how much space you really have.
Fred Langa is Vice President/ Editorial Director of CMP's Personal Computing Group. Contact Fred via his home page at http://www.winmag.com/flanga/hotspots.htm, in the WINDOWS Magazine areas on America Online and CompuServe, or at the e-mail addresses here.
Copyright (c) 1997 CMP Media Inc.