Windows Temporary Directory automatic cleanup

Page 1 of 2 12 LastLast

  1. Posts : 136
    Windows 7
       #1

    Windows Temporary Directory automatic cleanup


    Hi!

    Is there somehow a mechanism that automatic cleaning the temporary directories?
    Is there any? Is it Default turned off? Or when dies it clean? And how? Files oder than x days?

    Somehow my temp directories Are getting bigger ans bigger .. So I think they had to ne cleaned.
    Is there really no Windows built in feature to Do so?
    How so I get such thing?
      My Computer


  2. Posts : 6,285
    Windows 10 Pro X64
       #2

    Most folks install a program like CCLeaner then run it nightly or weekly.
      My Computer


  3. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #3

    Suggestion


    If you just want to use Windows to clean up try:

    Open an elevated command prompt

    Elevated Command Prompt

    In the command prompt window type cleanmgr.exe sageset:20

    Press Enter

    (The number 20 can be any number. It's the number that will be used to remember the settings that you apply next).

    Windows Temporary Directory automatic cleanup-cleanup.jpg

    On the screen that opens up -choose your cleanup options. It's safe to tick all checkboxes but just tick the Temporary Files box if it suits your needs. Then click OK.

    In the command prompt window type:

    cleanmgr.exe sagerun20

    Windows will run advanced disk cleanup as per your specified choices.


    There are other ways to clean up temp files but cleaning all temp files can sometimes cause problems. I regularly use a tool called D7 to delete all temp and zero byte files on a partition but it's not a wise move without having a system image backup in place.

    Another good tool is Temp File Cleaner by Old Timer. It's mentioned often on this forum.

    TFC - Temp File Cleaner by OldTimer - Geeks to Go Forums
    Last edited by Callender; 05 Mar 2014 at 14:36. Reason: correct typo again
      My Computer


  4. Posts : 2,497
    Windows 7 Pro 64 bit
       #4

    Windows has no automatic facility for deleting temp files. It can be done manually with disk cleanup or other utilities. An automatic facility could cause problems for some programs and that is likely why there is none.
      My Computer


  5. Posts : 136
    Windows 7
    Thread Starter
       #5

    I'm realy a bit irritated that there is no real onboard solution ...

    As for the "problem" of removing files:
    From my point of view there should be no problem by removing the files by some restrictions:
    - delet files older than X Days
    - keep only the newest file up to 1 GB

    As Applications only store temporary files in the temp directories there should not be any problems.
      My Computer


  6. Posts : 4,776
    Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
       #6

    Changing Windows disk cleanup options


    MPREv said:
    I'm realy a bit irritated that there is no real onboard solution ...

    As for the "problem" of removing files:
    From my point of view there should be no problem by removing the files by some restrictions:
    - delet files older than X Days
    - keep only the newest file up to 1 GB

    As Applications only store temporary files in the temp directories there should not be any problems.
    Hi,

    Well windows disk cleanup excludes temp files that are newer than 7 days old but it's done that way so that it won't cause problems.

    You could change this setting with a registry hack:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files

    by setting a lower value for "last access" but personally I leave it set to 1 - in other words 24 hours.

    As for excluding files over a certain size - I don't know of a way in Windows. As you say, that feature doesn't seem to be included.

    A user could waste a lot of time and effort attempting to clean "system clutter" for a minimal performance benefit when most of the time the tools built into windows are adequate.

    However my personal preference is to get rid of anything that's not needed where possible and I'm sorry to say that it requires third party software and in some cases writing custom scripts!
    Last edited by Callender; 22 Jan 2016 at 20:40. Reason: remove invalid link
      My Computer


  7. Posts : 2,497
    Windows 7 Pro 64 bit
       #7

    As Applications only store temporary files in the temp directories there should not be any problems.
    The problem is in how you define "temporary". Some applications have a rather different view of temporary than many users and if they are prematurely deleted there can be problems. Any automatic deletion of these files could cause problems. Remember that temporary files are for the most part created by applications for application use. It is a very sensitive matter for Windows to delete files created by applications and Windows tends toward a very conservative view. And knowing what I know of temporary files I think it the right approach.
      My Computer


  8. Posts : 10,455
    Microsoft Windows 7 Home Premium 64-bit Service Pack 1
       #8

    CCleaner has an option, which is on by default, to only delete files older than 24 hours. You can also automate CCleaner using the Windows task scheduler. You can exclude specific files from deletion if it is causing problems.
      My Computer


  9. Posts : 136
    Windows 7
    Thread Starter
       #9

    Callender said:
    Well windows disk cleanup excludes temp files that are newer than 7 days old but it's done that way so that it won't cause problems.
    That sounds good!


    Callender said:
    There's an interesting article here that does indicate that a user could waste a lot of time and effort attempting to clean "system clutter" for a minimal performance benefit when most of the time the tools biult into windows are adequate.
    Thats not a matter of performance, its a matter of disc space
      My Computer


  10. Posts : 6,285
    Windows 10 Pro X64
       #10

    If you are so tight on disk space that cleaning out temp files makes a difference, you need a larger hard drive.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 09:00.
Find Us