Excel whiz John Walkenbach inspired today’s tip with this post:
I haven’t looked at my Windows \temp directory in a long time. I used to be pretty good about keeping it cleaned out, but I’ve ignored it lately. I just looked at it and found that it contains
- 4,272 files
- 95 folders
- 721Mb
Yikes! Shouldn’t this stuff should be deleted by the apps that placed them there?
Well, yes and no. I just checked this system and discovered 95MB of disk space in use by 496 files and 103 folders, most of them empty. The entire collection dates back about 60 days, which must be the last time I cleaned out temp files.
Some of those files were ones I created or downloaded. (Putting them in the Temp folder is the best way of dealing with files you are positive you won’t want to keep.) When I play a media file directly from a browser or view a Word document or PDF page in the browser window, the downloaded WMV or DOC or PDF file is saved in my Temp folder. Microsoft Office creates a bunch of temp files as it works to keep track of changes and enable its automatic recovery features. I don’t bother deleting these files manually after I’m done, and I don’t expect any program to aggressively clean them up either. The whole idea of the Temp folder is to serve as a junk drawer for files, and any program that puts a file there should assume it’ll get tossed out with the trash sooner rather than later when I empty the Temp folder.
Here are three ways to do just that:
- The hard way: delete files manually using Windows Explorer. As J-Walk discovered, Explorer quits abruptly as soon as you encounter a file that’s in use – and at least on my computer the Temp folder is usually filled with a dozen or more files in use. To avoid hitting one of those files, display the folder’s contents in Details view and then sort by date. That way you can delete files in groups. Select the oldest files and delete them, then select a newer group of files and delete those, until you get to a group that includes some files in use. At that point you can stop. You’ve probably cleaned out all that you can do.
- The easier way: Use the Disk Cleanup Wizard. Click Start, All Programs, Accessories, System Tools, Disk Cleanup. Pick a drive, click OK, and wait for the quick analysis. Click OK again, and you’ll empty the Recycle Bin, clear out Internet Explorer’s cache, and empty all files from the Temp folder that are more than a week old.
- The really easy way: Create a Scheduled Task to have your system clean out your Temp folder and perform other cleanup chores automatically. If you poke around in the Scheduled Tasks folder, you’ll see that this option is available with a wizard’s help.

To learn how you can schedule this bit of routine maintenance to run once a week (or on any schedule you prefer), see this tip.
Ed, I’d suggest you look at two very good freeware programs.
CCleaner. It cleans out cookies, temp files, etc based on your preferences. I regularly run this program to keep my system free of “e-dust” build up.
The next program is Unlocker. This program is brilliant because it can tell you what process has locked up a file and it preventing it from being deleted. Many times Explorer will grab hold of avi or mpeg files and not let go and this program can delete those files. I wouldn’t suggest using this for every locked file because that could destabilize a system but it works in many cases.
I second the recommendation for CCleaner.
It’s easy to use, and very thorough.
I have a logoff script clean my Temp directory everytime I logoff.
“RD /S /q “C:\WINDOWS\Temp”