I use disk cleanup pretty regularly, but I never check the “Compress Old Files” option. Although I never use it, it always checks the entire file system while determining what to clean up. That part of the process takes forever.
Text from the article: (submitted by Calvin Tong)
When running ‘Disk Cleanup’ on a Windows 2000 or XP workstations, you may have notice that it pauses for a long time when checking for files to be compressed. One of things you can to do to save time is to edit the registry file to automatically bypass this step in Disk Cleanup. This is good if you already know that you won’t be using the Compress Old Files feature and just need to clean up unnecessary files.
- Click on Start > Run > Regedit (or Regedt32.exe)
- Backup your current registry. To do this, click on File > Export and enter a name. (I suggest using the date as part of your name, as in backup-reg-mar-3-2003)
- After you have backed up your registry, drill down as follows:
HKey Local Machine > Software > Microsoft > Windows > Current Version > Explorer > Volume Caches > Compress Old Files
- In the right hand pane, double click on the REG_SZ (default) variable to edit it
- A window pops up that will have a long string of characters in the Value Data field: B50F5260-0C21-11D2-AB56-00A0C9082678
- Press DEL to remove (clear out) the value data field, then click OK and then exit the RegEdit program. Note: we are NOT deleting the actual key, just the value assigned to the key!
- That’s it, and you don’t even have to reboot!