Login    Forum    Search    FAQ

Board index » Upgrading and Repairing Forum » Scott's Tips




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Do NOT use "Compress old files" in Disk Cleanup
 Post Posted: Sun Jul 13, 2008 11:50 pm 
Offline
Site Admin

Joined: Sun Feb 04, 2007 11:44 am
Posts: 5796
Windows 98 and later versions include a Disk Cleanup tool that is primarily designed to recover disk space by finding (and optionally deleting) temporary and/or otherwise unnecessary files. While this is a good idea in general, the Disk Cleanup tool included in Windows 2000 and XP has one additional function that isn't desirable at all, called "Compress old files". This function doesn't actually "clean" or delete any files, instead it searches for files that haven't been accessed in a specified number of days (the default is 50), and then offers to compress them in order to save space.

There are unfortunately *many* problems with how the Compress old files function works, not to mention that it isn't even a good idea in the first place, which is probably why this function was removed from the Disk Cleanup tool in Vista. The first problem is that when you run Disk Cleanup under Windows 2000/XP it automatically scans for files to compress, which often takes a *long* time. So long in fact that it may even cause the tool to stop responding. Even if the scan does complete, the tool doesn't tell you how many files it has chosen to compress, nor is there a way to specifically list them. If you actually check the "Compress old files" box and proceed with the operation (*NOT* recommended), the files will be immediately compressed, which depending on the number and size of the files will usually takes a significant amount of time. And if that's not bad enough, from that point forward the files that are compressed will take longer to access as they must be dynamically uncompressed every time they are read, and dynamically recompressed every time they are written. In the end, the meager space savings gained by compressing the files does not even begin to offset the time it takes to scan for and compress the files, not to mention the resulting drop in performance whenever they are accessed in the future.

Fortunately these problems can be easily corrected by disabling the Compress old files function in the Disk Cleanup tool and subsequently restoring any compressed files to their original uncompressed state. The Compress old files function in Disk Cleanup can be disabled via a simple registry edit, as described in the following article:


To clarify what Microsoft states in the article (the wording is a little strange), the "incorrect entry" in the registry is in fact the default entry that enables the "Compress old files" option to appear in Disk Cleanup. Deleting that entry simply removes that function from Disk Cleanup, which is the intended result.

If you maintain many systems it would be tedious and time consuming to manually edit the registry on each one. Fortunately there is an easier way. On the systems I service and maintain, I automatically apply this change via a simple .reg file I created. To do this on your own systems, save the following text to a file called RemoveCompressOldFiles.reg, then using Windows explorer, double click on the file and select "Yes" to add the contents to the registry, then restart the system to apply the change.

Code:
Windows Registry Editor Version 5.00

;Remove the "Compress old files" function from Windows XP Disk Cleanup tool
; By: Scott Mueller - http://forum.scottmueller.com
;
; Disk Cleanup Tool Stops Responding While Compressing Old Files
; http://support.microsoft.com/kb/812248
;
[-HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Compress old files]


While this removes the "Compress old files" function from Disk Cleanup, it will not help with any files that were previously compressed. If you have ever used the function you'll probably want to *undo* the compression on any files and/or folders it might have previously compressed. Note that compressed files and folders will normally show up as colored blue in Windows Explorer. To uncompress a single file or folder, you can right click on it, select Properties; then under the General tab select Advanced, uncheck the box marked "Compress contents to save disk space" and then click OK; OK. While it would be tedious and time consuming to uncompress thousands of files and folders using this method, fortunately there is an easier way. To uncompress ALL files and folders across an *entire* drive, click Start; Run; enter the following command in the Open: box, then click OK:

Code:
compact /u /s /a /q /i C:\*


The compact command with those parameters will uncompress *all* files and folders on drive C:. If you have other drives, you can repeat the command replacing the C: with the appropriate drive letter for one of the other drives.

OK, at this point you're probably wondering "If this feature isn't such a good idea after all, then why did Microsoft include it in the first place"? That's because it *might* have been a good idea back in 1996 through 2000 when Windows 2000 and XP were being developed, and hard drives had much lower capacities and stored far fewer files than they do today. These days disk space isn't much of an issue, and performance is far more important.

As a final part of this tip, note that I don't use the Disk Cleanup tool on my own systems anymore. There is a free alternative that is significantly more powerful, much faster and overall easier to use. I'm talking about CCleaner (Crap Cleaner): http://www.ccleaner.com

Note that the standard version of CCleaner includes the Yahoo toolbar. To download a "slim" toolbar-free version (recommended), visit the "other builds" page here: http://www.ccleaner.com/download/builds

Scott.


Top 
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
 
Post new topic Reply to topic  [ 1 post ] 

Board index » Upgrading and Repairing Forum » Scott's Tips


Who is online

Users browsing this forum: No registered users and 1 guest

 
 

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: