How to schedule automatically clean the temporary files on Windows? [duplicate]

After a few months of usage my PC and laptop slows down. Then I use the utility called CCleaner and then everything seems fast again.

Is there a utility which automatically clean the temporary and other waste files software or Windows create upon usage? So that my pc and laptop always remain fast.


Solution 1:

CCleaner doesn't pop up in your face when it is doing an automatic clean, all it does is create a small flashing icon in the tray.

You can schedule an automatic clean by setting up what you want cleaned in CCleaner first, then a scheduled task running the command "C:\Program Files\CCleaner\CCleaner.exe" /AUTO. This silently cleans the PC in the background.

You can of course have CCleaner run at scheduled intervals, at startup, shutdown, or logoff.

There are more command line parameter options on Piriform's website. The free version of CCleaner has this feature, as well as the Technician's edition.

If one would prefer to clean their temporary files without using a third party tool, see magicandre1981's answer below.

Solution 2:

To clean the Temporary Internet files of the IE, download this tool, expand it and open the Task Scheduler MMC snapin (taskschd.msc). Create a new scheduled task which runs weekly for example and select the expanded CleanIETempFiles.exe. At the textbox "Add arguments" enter -t and click ok.

Now the task scheduler kills the temporary files weekly.

To kill other files you can automate the disk cleanup wizard (cleanmgr.exe) which is included in Windows. Run cleanmgr.exe /sageset:1 and configure which files you want to clean. Go to the first created task, add a new program you want to run and select cleanmgr.exe as program and /sagerun:1 to the arguments box.

enter image description here

This kills all temporary files without buying/using a 3rd party tool.