Temp files Inside Out

Serdar Yegulalp and I have exchanged several e-mails this afternoon discussing how Windows Vista handles the logged-on user’s Temporary files folder. He calls it Vista’s Not-So-Secret Garbage Dump and has instructions on how to empty it.

I remember when Carl and Craig and I wrote the first edition of Windows XP Inside Out we concluded in our early testing that the XP Disk Cleanup tool (Cleanmgr.exe) was broken, because we couldn’t see it actually clearing the contents of the Temp folder. Turns out that’s a deliberate design decision. The Cleanup Manager retains files that have been added to the Temp folder in the past week, which is a small safety net that keeps you from shooting yourself in the foot by mistakenly wiping out files that a program is using as part of a current installation. (We fixed the error in later updates to the book, and the latest version of this text on page 727 of Windows Vista Inside Out is correct, as far as I know.)

If you want to see the contents of the Temp folder, the easiest way is to use its built-in system variable, %temp%, which you can type in the Search box. You can also open the system folder that contains application data for your profile (%LocalAppData%) and see what programs are saving for their own use.

Be aware also that Vista includes an additional Temp folder in the AppData\LocalLow folder, which you can reach with the system variable %LocalLow% and where you’ll find program files kicked off in Protected Mode IE. Adobe’s Acrobat 8 and Reader 8 software both use this folder, which can cause some problems.

Finally, knowing the whereabouts of the Temp folder is useful if you’re having trouble with an installer that unpacks its files and then automatically runs a Setup program. Most such installers delete those temporary files when Setup finishes. If you need to run a subset of the installer files or locate a driver, start the installer and wait until it’s unpacked the files. When you see the Setup dialog box, leave it open and navigate to the Temp folder (usually via %temp% but you might also need to look in %LocalLow%). Find the folder full of unpacked files and copy it to a safe location. Then cancel the installation and allow the Setup program to clean up. You can now go to the folder you copied and use whatever setup files you need. You can also save the extracted files in your Downloaded Programs folder so that next time you want to install or reinstall the same program you can skip the unpacking portion.

Bonus tip: Customize Disk Cleanup tasks. Although the instructions are for XP, the process works more or less the same for Vista.

13 thoughts on “Temp files Inside Out

  1. Hugely useful all around — and the bit about customizing Disk Cleanup is even better. I’ve since set up a batch file with just the customizations I want for Disk Cleanup (i.e., no erasing the hibernation file).

  2. My only problem is temp file cleaning is overrated in that people think it improves performance which is doesn’t – outside of scan and search times. Obviously it increases available disk space. I just think too many people think their system slows down due to temp file clutter, which is nonsense.

  3. Andrew, you’re right. I just checked my wife’s notebook, which has a 120GB hard drive and had fewer than 100MB of files in the Temp folder after nearly eight months of continuous use. My own computer also had fewer than 100MB of disk space in use in the Temp folder.

    It’s worth knowing how the Temp folder works and where it’s located, but rarely will cleaning it out do anything noticeable for performance.

  4. Addendum and possible anecdotal evidence: I did some remote assistance on a friend’s PC the other night using Crossloop (www.crossloop.com), and found TWO AND A HALF GIGABYTES of junk in the user profile temporary directory. When deleted, a lot of the app flakiness she was experiencing went way down. (We also fixed Windows Update and got her a new video driver in the bargain, so I’m sure that had something to do with it as well … but 2 1/2 gigs!?)

  5. Serdar, did you get any idea of what was taking up all that space? Was it one out of control app? Just having a few gigs of junk hanging around shouldn’t have any effect on performance as long as it isn’t executing.

  6. From the look of it, it was leftovers from various app installations. I doubt it was causing slowdowns, but I imagine it might have been causing apps to hang (Photoshop was one of the culprits in that regard). I’d wager the video driver did more for the system’s general speed, but I’m tentatively guessing app stability was helped by cleaning up the \TEMP folder.

  7. Argh. Minor correction: Photoshop was not on this particular computer, but was on another person’s machine and was crashing badly enough that it wouldn’t even work after a reinstall. Dumping \temp fixed that.

  8. I found the temporary internet files and saw that there were no files listed however under the organize tab it shows properties I found it says read only and hidden but also still says there are thousands of files and numerous folders…….how can I get the property tab to allow me to see hidden files (I have already got hiddens files open on my computer etc).
    I’m trying to get into the internet files to get FVL movie files from U Tube to covert to WMA

  9. Dennis, this isn’t a discussion forum, it’s a comment thread on a blog post. You’re better off going to a real support forum for this help.

    Anyway, you can view your files easily by doing the following: From IE7, click Tools, Internet Options, Under the Browsing History heading click Settings, then click View Files.

Comments are closed.