Hack 113. Hack Your Way to a Cleaner Hard Disk
Cut through the clutter, clean up your hard disk, and reclaim space you never knew you had with these hacks, techniques, and downloads.
No matter how much hard-disk space you have, it's just never enough. Your hard disk is littered with old files you no longer need, temporary files, cache files, and more clutter than an old attic. Here's how to hack your way to a cleaner hard disk.
12.7.1. Create Separate Hard-Disk Cleanup Profiles
XP's Disk Cleanup tool (Control Panel Performance and Maintenance "Free up space on your hard disk") is a quick-and-dirty way to clean your hard disk of unnecessary files. It calculates how much hard-disk space you can save by deleting a variety of different file types and caches or compressing and archiving old files you rarely use (see Figure 12-8).
Figure 12-8. The Disk Cleanup tool reporting how much hard-disk space it can free up
But enabling and disabling all its various options each time can be time-consuming. And simply using the settings from the last run might not quite suit your fancy. Sometimes you might want only certain files deleted and others kept around a little longer. For example, your temporary Internet files speed up your browsing experience by keeping on hand the graphics files associated with sites you frequently or have recently visited.
To solve this problem, you can create separate disk-cleanup profiles; that way, whenever you want your hard disk cleaned in a certain way, you can run just that one profile. For another set of cleanup options, just use a different profile.
While these profiles aren't available via the GUI, you can get at them under the covers by using the command-line version of the Disk Cleanup tool: cleanmgr.exe. First, you need to create a new disk-cleanup profile. Type cleanmgr /Saveset:n, where n is any number between 1 and 65535. The Disk Cleanup Settings dialog will appear, as shown in Figure 12-9, allowing you to select which items you would like to be cleaned using this profile.
Figure 12-9. The Disk Cleanup Settings screen
While at first blush it might appear you've reached the same dialog you reached using the GUI version of Disk Cleanup, take a closer look. You'll notice you're offered more cleanup options. You're able to automatically remove debug dump files, setup log files, catalog files for the Content Indexer, temporary setup files, old Chkdsk files, and various other items the GUI version doesn't offer to clean for you.
Make your selections and click OK to create your cleanup profile. To run this profile at any time, type cleanmgr /Saverun:n, where n is the number of the profile you've just created.
12.7.2. Clean Your Hard Disk Without Disk Cleanup
Frequently, cleaning your hard disk manually is more effective than using Disk Cleanup. Disk Cleanup won't find all the files you want to delete, and it might also delete files you'd prefer to keep. For example, Disk Cleanup won't delete all the files in your \TEMP directory, even though it says it will. Also, it doesn't touch files that are less than one week old.
A manual cleaning should include the following steps:
12.7.3. Download a Better Disk-Cleanup Tool
Disk Cleanup works fine for a free built-in tool. But you can download tools that can do an even better job; such tools can find and delete duplicate files, delete orphan shortcuts that link to programs that no longer exist, and similar functions. There are many out there; two of the best are CleanUp! and System Mechanic.
CleanUp! (http://www.emesoft.se; $18, trial version available) expands on XP's Disk Cleanup tool by finding and deleting shortcuts and favorites that are no longer valid, giving you a list of Registry entries that point to files no longer on your hard disk, and letting you examine and delete Internet Explorer AutoComplete entries.
System Mechanic (http:/www.iolo.com; $59.95, trial version available) is far more than a disk-cleanup tool. In addition to normal cleanup tasks, it finds and deletes obsolete and junk files that are left behind by uninstalled programs, finds and deletes duplicate files, finds and fixes broken shortcuts, cleans out the Registry, lets you fine-tune Windows settings, provides privacy protection, and more. In all, it offers a suite of 15 utilities.