Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Windows Temporary Directory automatic cleanup

04 Mar 2014   #1
MPREv

Windows 7
 
 
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 System SpecsSystem Spec
.
04 Mar 2014   #2
Ztruker

Windows 10 Pro X64
 
 

Most folks install a program like CCLeaner then run it nightly or weekly.
My System SpecsSystem Spec
05 Mar 2014   #3
Callender

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 
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).

-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


My System SpecsSystem Spec
.

05 Mar 2014   #4
LMiller7

Windows 7 Home Premium 32 bit
 
 

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 System SpecsSystem Spec
09 Mar 2014   #5
MPREv

Windows 7
 
 

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 System SpecsSystem Spec
09 Mar 2014   #6
Callender

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
 
 
Changing Windows disk cleanup options

Quote   Quote: Originally Posted by MPREv View Post
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!
My System SpecsSystem Spec
09 Mar 2014   #7
LMiller7

Windows 7 Home Premium 32 bit
 
 

Quote:
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 System SpecsSystem Spec
10 Mar 2014   #8
kado897

Microsoft Community Contributor Award Recipient

Microsoft Windows 7 Home Premium 64-bit Service Pack 1
 
 

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 System SpecsSystem Spec
10 Mar 2014   #9
MPREv

Windows 7
 
 

Quote   Quote: Originally Posted by Callender View Post
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!


Quote   Quote: Originally Posted by Callender View Post
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 System SpecsSystem Spec
10 Mar 2014   #10
Ztruker

Windows 10 Pro X64
 
 

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

 Windows Temporary Directory automatic cleanup




Thread Tools




Similar help and support threads
Thread Forum
Disable automatic hardware detection and/or automatic driver install
not sure which section this pertains to specifically, but "drivers" seems close enough. issue i recently upgraded to an sli graphics configuration. since upgrading, my previous method of avoiding the TDR driver crash has stopped working. known fix that i can't get to work anymore
Drivers
Disk Cleanup and Temporary Files
I had a question about the Disk Cleanup in Windows 7 Home Premium: The disk cleanup box says, "You can safely delete temporary files that have not been modified in over a week." When I run disk cleanup, does it only delete files older than one week or all of them? I want to make sure that...
Performance & Maintenance
Disk Cleanup has found 35.5 GB of temporary files; how can I see them?
I ran Disk Cleanup and it found 35.5 GB of "Temporary Files." I thought this was odd. Before continuing, I checked my disk usage. I have used 48.3 GB of my 80 GB partition (actual size 74.2 GB). I doubt I only have 12.8 GB of "real" files and the rest are "temporary," but maybe. I took a...
Performance & Maintenance
Huge Temporary Internet Files Directory! How to clean?
Hello, I have Windows 7 Professional x64 for 6-7 months and I noticed i get low on free space on C: Temporary Internetet Files had 18.5 GB !! After reading the forum I found out how to delete some of the files. Now it's "only" 17.7 GB ...
Browsers & Mail
Replace files in multiple directory, from a single directory
I have a 10 files that have all been categorised into about 40 folders. These files have been damaged. I have a backup of all these files, but they are not categorised and sit in a single directory. Does anyone know of an easy technique to batch replace the damaged files with the originals? ...
General Discussion
Automatic Updates & Stopping Automatic Restarts
How do I prevent Automatic restarts after important updates? I want my computer to be updated when theres an important update. I want to be told my computer was updated and needs to be restarted. I was in the middle of something important tonight before I passed out on the couch. I woke up and...
Windows Updates & Activation


Our Sites

Site Links

About Us

Find 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 10:12.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App