0

When you run Disk Cleanup one of the categories is "Temporary Files".

  1. Where are these temporary files?
  2. Has anyone been able to copy files to that location and re-run Disk Cleanup and see the size increase?
  3. Has anyone actually verified that the files in those folder(s) get deleted?
ZiggyStardust
  • 107
  • 2
  • 3
  • 11

2 Answers2

1

Where are these temporary files?

By default the files are located here:

  • C:\Temp aka %TEMP%

Has anyone been able to copy files to that location and re-run Disk Cleanup and see the size increase?

If you select the option, to wipe your temporary files, it will wipe all files in that directory which are not currently in use by a process.

Has anyone actually verified that the files in those folder(s) get deleted?

I personally, have verified, the files that were suppose to be deleted were deleted.

Ramhound
  • 41,734
  • 35
  • 103
  • 130
  • Also C:\Users\name\AppData\Local\Temp – David Marshall Feb 22 '17 at 20:22
  • Just a question. Do those paths include Windows .CAB files that are sometimes made but not deleted by windows updates? – RamonRobben Feb 22 '17 at 20:26
  • Windows Update files don't go to temporary files – Ramhound Feb 22 '17 at 22:44
  • Well... if you look at the registry Windows 7 has one location. Windows 10 has four. For some reason the four locations for Windows 10 don't get cleaned. Just one. – ZiggyStardust Feb 23 '17 at 14:57
  • The mystery is starting to unravel. The registry entry HKLM\Software\Microsoft\CurrentVersion\Explorer\VolumeCaches\Temporary Files\LastAccess is a retention setting. How many days you want to keep temporary files before deleting. The people that can copy files to the temp folder and immediately see and remove those files with Disk Cleanup have the retention set to 0. Mine, for some reason, was set to 7. So my Disk Cleanup wasn't going to see or remove what I copies to that folder for 7 days. So the next question is..... what sets that number? Why is it 0 for some and 7 for others? – ZiggyStardust Feb 23 '17 at 14:58
  • 1
    @ZiggyStardust - That would be it's own question, i.e. "How do I set the retention policy on temporary files", which is seperate from "where are my temporary files stored". *The default is 7 days, if you found a PC where the value was 0, then somebody manually changed it to that value.* – Ramhound Feb 23 '17 at 16:05
  • "`C:\Temp` aka `%TEMP%`" - Is that Windows 10? On Windows 7, the `%TEMP%` user variable would seem to default to `%USERPROFILE%\AppData\Local\Temp` and the system variable to `C:\Windows\Temp`. (?) – MrWhite Jan 12 '18 at 10:17
1

As mentioned Windows 7 has one location, Windows 10 has 4. HKLM\Software\Microsoft\CurrentVersion\Explorer\VolumeCaches‌​\Temporary Files\LastAccess is a retention setting. By default Windows sets it to 7 days but users manually change it to 0. It will only remove files that meet the retention settings. There are two folders under Windows 10 (C:\Windows\Logs and C:\Windows\System32\Logfile) that will only be cleaned if you run cleanmgr from an elevated command prompt.

ZiggyStardust
  • 107
  • 2
  • 3
  • 11