locked
Temp files: best cleaning strategy? RRS feed

  • Question

  • Hello,

    I would like your opinion on the best strategy for set-up of Windows  system Temp files. (not internet temp files)

    - Is it really fully safe to delete them manually?

    - Does Windows 7 delete them automatically and how?

    - If you have multiple partions (in a single physical SSD drive), where would you set their folder location.

    Many thanks for any help. Much appreciated.

    Monday, June 28, 2010 9:52 PM

Answers

  • On Mon, 28 Jun 2010 21:52:20 +0000, Egomet wrote:
     
     
    > would like your opinion on the best strategy for set-up of Windows system Temp files. (not internet temp files)
    >
    > - Is it really fully safe to delete them manually?
    >
    > - Does Windows 7 delete them automatically and how?
    >
    > - If you have multiple partions (in a single physical SSD drive), where would you set their folder location.
    >
    > Many thanks for any help. Much appreciated.
     
     
    Yes, they can, and should be, deleted periodically.
     
    The temp folder provides workspace for programs. Programs can create
    temporary files there for their own temporary use. Each program should
    delete all its temporary files when it closes, but for various reasons
    it doesn't always happen (for example, if the program crashes, it
    never gets to do this). That's why it's a good idea to periodically
    clean out anything left there.
     
    Also note that there are some program installations which work in two
    steps. The first step concludes by writing temporary files and
    rebooting. The second step starts automatically after rebooting and
    needs to find those files there (and then deletes them when it's
    done).
     
    Other than doing it automatically when rebooting (that would interfere
    with installations like the kind I described), it's always safe to
    delete the contents of the temp folder. Because it's safe to delete
    any temp files that aren't open and in use by an application, and
    since Windows won't let you delete open files, it's safe to (try to)
    delete them at any time. If any fail to delete because they're open,
    they'll either be deleted automatically when the app using them
    closes, or you'll get them the next time you delete manually.
     
    Some people may suggest that you reboot before deleting anything, but
    that's not necessary, for the reason described above (on the other
    hand, it doesn't hurt to do it).
     
     

    Ken Blake
    Monday, June 28, 2010 10:27 PM

All replies

  • On Mon, 28 Jun 2010 21:52:20 +0000, Egomet wrote:
     
     
    > would like your opinion on the best strategy for set-up of Windows system Temp files. (not internet temp files)
    >
    > - Is it really fully safe to delete them manually?
    >
    > - Does Windows 7 delete them automatically and how?
    >
    > - If you have multiple partions (in a single physical SSD drive), where would you set their folder location.
    >
    > Many thanks for any help. Much appreciated.
     
     
    Yes, they can, and should be, deleted periodically.
     
    The temp folder provides workspace for programs. Programs can create
    temporary files there for their own temporary use. Each program should
    delete all its temporary files when it closes, but for various reasons
    it doesn't always happen (for example, if the program crashes, it
    never gets to do this). That's why it's a good idea to periodically
    clean out anything left there.
     
    Also note that there are some program installations which work in two
    steps. The first step concludes by writing temporary files and
    rebooting. The second step starts automatically after rebooting and
    needs to find those files there (and then deletes them when it's
    done).
     
    Other than doing it automatically when rebooting (that would interfere
    with installations like the kind I described), it's always safe to
    delete the contents of the temp folder. Because it's safe to delete
    any temp files that aren't open and in use by an application, and
    since Windows won't let you delete open files, it's safe to (try to)
    delete them at any time. If any fail to delete because they're open,
    they'll either be deleted automatically when the app using them
    closes, or you'll get them the next time you delete manually.
     
    Some people may suggest that you reboot before deleting anything, but
    that's not necessary, for the reason described above (on the other
    hand, it doesn't hurt to do it).
     
     

    Ken Blake
    Monday, June 28, 2010 10:27 PM
  • Thank you very much for the reassuring answer ;-)

     

    Tuesday, June 29, 2010 8:20 AM
  • On Tue, 29 Jun 2010 08:20:39 +0000, Egomet wrote:

    > Thank you very much for the reassuring answer ;-)


    You're welcome. Glad to help.
     

    Ken Blake
    Tuesday, June 29, 2010 3:31 PM
  • Looks like this could be a forum/NNTP bridge quirk that created a new thread instead of replying to the original at: http://social.technet.microsoft.com/Forums/en-US/w7itproperf/thread/a4116de4-5f81-4c22-847f-c531fd3cd6a4/

     

    Hopefully, a moderator can merge these two threads...

    Tuesday, June 29, 2010 5:31 PM
  • I could certainly tell - the agony was so great that stories will be told, books will be written, bards will sing, and hamsters will dance, about the copious quantities of agony that were endured . ;-)

    ...but I digress... 

    Tuesday, June 29, 2010 8:32 PM
  •  
    "Egomet" <=?utf-8?B?RWdvbWV0?=> wrote in message
    news:2dd245e7-6375-4f37-9939-122259698b45...
    > Thank you very much for the reassuring answer ;-)
    >
    >
    >
     
    Along with what Ken posted, I set up a scheduled task to run a batch file
    about an hour after my PC is normally turned on. That way I'm not deleting
    those files that Ken was referring to that installation programs may write
    and need after reboot. I changed my environmental settings to point to
    C:\wutemp for my temp and .tmp files. Then I wrote a very simple batch file
    with the following line in it:
     
    RD /S /Q C:\wutemp
     
    /S = Removes all directories and files in the specified directory
    in addition to the directory itself. Used to remove a directory
    tree.
     
    /Q = Quiet mode, do not ask if ok to remove a directory tree with /S
     
    It tries to remove the wutemp folder, but since there are always protected
    files in it, it just skips over those and deletes the rest and leaves the
    folder intact. Since a command prompt program, the deleted files do not go
    to the Recycle Bin; rather, they are just deleted.
     
    I've used this for some time now in XP and Win7 with no adverse effects.
    --
    SC Tom
     
     
    Tuesday, June 29, 2010 10:51 PM