Delete files in Windows Temp Folder

Should I keep the box checked for "Only delete files in Windows Temp Folder older than 24 hours"?

I understand that...

Selected by default. This prevents CCleaner from deleting temporary files that may be currently in use.

Isn't it true that this is a place that Malware likes to hide?

Any thoughts?

I have to agree that Malware hides there most often. However, I guess you're fine to have that checked and then, if you suspect malware, uncheck it. Strangely (and I maybe wrong) I think it looks at creation date not modification date.

I think it looks at creation date not modification date.

Thats a good question Nergal, and I wonder if you're correct?

Why does CCleaner have the option "Only delete files in Windows Temp Folder older than 24 hours"?

If a file was in use, wouldn't it be locked by Windows and not deleted?

If a file was in use, wouldn't it be locked by Windows and not deleted?

No - it depends upon how it is used.

I can double click junk.txt and notepad launches and I can read the file,

whilst notepad is displaying the file I can focus back to Windows Explorer and delete the file and it is gone,

even though Notepad still shows what WAS there.

I can launch CMD.EXE and issue the command

ping -w 40 -n 100 127.0.0.1 >> junk.txt

and whilst ping is running I can tell Windows Explorer to delete the file and am told

"Cannot delete junk: It is being used by another person or program"

Conclusions :-

The O.S. will not allow files to be deleted when in use by SOME programs,

and the 24 hour precaution is redundant for them,

The O.S. WILL allow those same files to be deleted whilst in use by other programs,

in which case the 24 hour precaution is appropriate

Alan

Thanks Alan,

So, the "Only delete files in Windows Temp Folder older than 24 hours" is in place for the instances that Windows will delete a file even if its in use.

The box is there for the times you need to empty the folder for what ever reason.

I'm going to leave the box checked just in case a program is using a file.