If I look at my %TEMP% folder (that is, C:\Documents and Settings\Me\Local Settings\Temp\), I see some applications stick stuff in there, and some applications stick it into a subfolder off there. Sometimes those subfolders have names that can be traced back to the application or the author, and some are random.

  • Is there any best practice here?
  • Does it matter?
  • Does the whole folder get deleted if you do a disk cleanup?
  • What about C:\Windows\Temp? When is that used by applications other than Windows itself - if ever?

2 Answers 2

  1. There is no best practice I'm familiar with. It is a directory for temporary files, and it is most likely going to look like a garbage can. As a developer, I find it easier for me to create a directory with my application's name and place all my files there, and even clean it if I can. But I think that is just a good habit - nothing that the OS will be upset about.

  2. It matters only to those that need these files. If you generate a lot of files and used them later - you need to keep track of them. It is easier when they are all in the same directory. Also, every operating system has a limitation to how many files a directory can hold, so it is never good practice to put many files in the same directory.

  3. Disk Cleanup allows you to delete it - it is not done automatically unless you configure it somehow.

  4. I personally favor C:\WINDOWS\Temp - so I change my %TEMP% to point to it. It is usually internal for Windows components, but Windows works fine if my junk goes there as well. I recall someone once told me that everything under C:\Documents and Settings\myuser is a part of the user profile - so the less files there the faster your computer is. I don't know if it is true, but I avoid putting temporary files there anyway.

  • ...Cosmin was a close second
    – rossmcm
    May 23, 2011 at 11:27

C:\windows\temp is used by processes running as Local System, Local Service, and Network Service.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.