Windows 7 temp folder: do not delete files when exit program

MonkeyMan123

Senior Member
Joined
Oct 3, 2011
Messages
4
Hi all:

I have a bit of an unusual issue. I am trying to prevent Win 7 from deleting files from the temp folder (C:\Users\<NAME>\AppData\Local\Temp) when I close a program (in my case Firefox). I believe it is the OS, and not the program or my AV, which is deleting the files, though if folks think otherwise please let me know. Does anyone have suggestions on options to change to prevent files from being expunged from my \temp directory?



Here are the specifics:
I am trying to prevent Firefox from deleting files which I download using the Download Manager using the "open with" (rather than "save as") option.

These files remain in my folder, C:\Users\<NAME>\AppData\Local\Temp until after I close Firefox at which point they are deleted. Note: I am sure it is Windows which is deleting the files since:
* I have disabled my antivirus and related programs (Malwarebytes real time protection)
* I can see the file disappear from the \Temp folder a few seconds after Firefox is closed down
* when I terminate the Firefox process via the task manager the file deletion does not occur


Some other comments:
* I do not believe this is influenced by the Tools>Options>Privacy settings in Firefox, but I have set it to "Use Custom Settings for History" and unchecked "Clear History when Firefox Closes"
* I have experimented with various settings in Firefox's about:config (privacy.clearOnShutdown.* options are all set to false)
* files downloaded during previous sessions are not removed from \Temp when the browser is closed (so if I terminate Firefox via task manager it will not be removed when I exit again later)


My set-up:
OS: Win 7 Enterprise x64
Browser: Firefox 3.6.21
AV: Sophos
 


Solution
To prevent Windows 7 from automatically deleting files in the temp folder when you close a program like Firefox, you can try the following steps:
1. Change Temp Folder Settings in Windows:
- Go to the temp folder location: C:\Users\<NAME>\AppData\Local\Temp.
- Right-click on the Temp folder and select Properties.
- In the Properties window, go to the Security tab.
- Click on the Edit button to change permissions.
- Add your user account and grant it Full Control permissions to the folder.
- Apply the changes and click OK to confirm.
2. Modify Temp Folder Cleanup Settings:
- Check if the Disk Cleanup tool or any other cleanup utility is configured to delete files in the temp folder. You can adjust...
To prevent Windows 7 from automatically deleting files in the temp folder when you close a program like Firefox, you can try the following steps:
1. Change Temp Folder Settings in Windows:
- Go to the temp folder location: C:\Users\<NAME>\AppData\Local\Temp.
- Right-click on the Temp folder and select Properties.
- In the Properties window, go to the Security tab.
- Click on the Edit button to change permissions.
- Add your user account and grant it Full Control permissions to the folder.
- Apply the changes and click OK to confirm.
2. Modify Temp Folder Cleanup Settings:
- Check if the Disk Cleanup tool or any other cleanup utility is configured to delete files in the temp folder. You can adjust the settings to exclude this folder from cleanups.
3. Task Scheduler Settings:
- Windows may be cleaning up the temp files using a scheduled task. You can check the Task Scheduler for any tasks related to disk cleanup or file deletion and adjust them accordingly.
4. Firefox Settings:
- Ensure that Firefox itself is not set to clear temporary files upon closure. You've already verified some settings in Firefox, but you can double-check the following:
- Check Firefox settings under "Tools > Options > Privacy" to see if there are any settings related to clearing temporary files.
- Check Firefox's about:config for any settings that might be affecting the deletion of files upon closure.
5. Browser Behavior:
- Since you indicated that the files remain if you close Firefox via the Task Manager, it further suggests that Windows might be involved in the deletion process. This strengthens the possibility of Windows settings being the cause.
By adjusting these settings and configurations, you should be able to retain the files in the temp folder even after closing Firefox. If the issue persists, you might need to investigate further into Windows cleanup policies or any third-party software that could be affecting this behavior.
 


Solution
Back
Top