Questions about moving Windows temp files/folders to a separate physical drive

Joined
Jan 3, 2009
Messages
646
I was having many issues with out-of-memory errors and slow performance, a lot of it due to having to temporarily move my OS drive from the SSD array it was on to a 5400RPM drive for now and having to keep the swap file small.

SSDs have gone down in price, so I got a cheap small 128GB SSD that I am using just for temporary files for now, it has helped significantly. I figured that it would be useful even once I am back on a SSD to use this SSD for all my temporary data, but I wanted to know just how far I can go with that.

I know that for applications that themselves use a temporary folder, I will need to set that on a per-app basis, that's fine, I was talking purely about os-level temporary files/folders.

I already put the swap file there, that's easy to do. I have hibernation disabled for now since being a desktop I don't really need it, but I do know how to put it on the SSD if I need to. And I read this guide on moving the two standard temp folders:

https://www.howtogeek.com/285710/how-to-move-windows-temporary-folders-to-another-drive/

I still have four additional questions however:

1. Is there any actual user-saved data stored in these temp folders? I know that most of the user data is stored in the AppData folders, but I also know that apparently browsers make heavy use of these temp folders. Do they only put cached data and other such-non important information in there? Or would they also store bookmarks, or login cookies, etc in there? Information that would actually impact me if I were to lose it?

2. Are any of these necessary for Windows to start up properly or not lose anything between restarts? The issue is that I might also have to experiment with different operating system installs by swapping said drive, and I would like to re-use that SSD for temp data for all of them simply by wiping it since leaving temp data from another windows install/version could cause issues. I know that the swap file is not important between reboots, the hibernation file is but I have that disabled anyway, but I have no idea about the temp folders. Can those be deleted between reboots without issue? Also, would I still need to have the folders on the drive, but just empty, or will Windows simply re-create the temp folder that it has been set to if it does not exist?

3. Would I need to move the contents of the existing temp files to the other drive when I change the temp folder environment path?

4. And finally, are there any other OS-level temporary files/folders one can advise I can set to that spare drive?
 
Last edited:
Don't move the temp folders, many apps will not be expecting that.

I'm an IT guy and I run into a case very so often where somebody starts customizing and moving around OS folders.
They call me in because the system becomes unstable and has a lot of weird issues.

And my response is always, "You don't say? Really? You started playing with things and now it doesn't run right? Huh..... hard to figure.".

I've also run into cases where people thought it was cool to install Windows to the D: drive instead of the C: drive. Those systems never ran right either.

.
 
I have some systems where TEMP folders were moved to other partitions with only redirecting the environment variables method. No issues with anything. Programs use the env vars to store temporary files.
As to whether it's safe to delete..., that's why it's called "temp". It should be safe but this is something I cannot be 100% sure for every case.
There are locked files in temp folder while the system is running but I'm 99.9% sure you can start over with empty temp folder when you boot an/the OS.
This is something you can test yourself with a virtual machine for example.
 
Don't move the temp folders, many apps will not be expecting that.

I have done this for decades and not a single issue.
Which apps are you talking about?

I have some systems where TEMP folders were moved to other partitions with only redirecting the environment variables method. No issues with anything. Programs use the env vars to store temporary files.
Ditto



In regards to OP's Question

1. its all temp data things thay are used for a short amount of time with not dedicated long time pupose
so generally no. its part of windows dik clean tom remove files form within this golder

2: nope not needed for a functioning system
However some installer can put in files there and then you reboot the computer and it continues the install from the temp folder. Those are rare in modern system though.
However i do not advise blindely deletings things in there especiall if you are doing installations.

3. Most likely not.
I have never done it. just adjusted the 4 env variables
Again don to it if you have current installs that needs to finish

4:
Move hibernation and page file
 
I have done this for decades and not a single issue.
Which apps are you talking about?

I didn't keep a log book list of them. lol

The last one from memory was a financial app at a commercial real estate customer of mine.

The IT company before I came in moved the temp folder on a specific machine for some reason and that app kept crashing
only on that one machine. Fixed the temp folder location and it ran fine after that.

There is ZERO benefit from moving OS folders around and it may often cause problems.
By all means do as you wish though.

.
 
I didn't keep a log book list of them. lol

The last one from memory was a financial app at a commercial real estate customer of mine.

The IT company before I came in moved the temp folder on a specific machine for some reason and that app kept crashing
only on that one machine. Fixed the temp folder location and it ran fine after that.

There is ZERO benefit from moving OS folders around and it may often cause problems.
By all means do as you wish though.

.


There are tons of benefits. just because you don't understand them does not mean they are not there.
im having ahard time picturing it beeing an issue

either the software uses the evn variable and use the new temp folder
or its using some bad hard coded path which would mean I just using another folder.
CPU-z is one of them that seees mto use the temp folder inside windows event if the env variable has been moved. still not an issue .

I asusme you check you conclussion be moving the temp folder again and see that the software stopped to function? and it was not something else that was the issues that got fixed at the same time?
 
If you are on Windows 10 check your C:\Windows\Installer folder. It contains install files for Windows patches, some of which can safely be removed. There is a free program called PatchCleaner that will scan and move or delete the files that are no longer needed. Mine was over 20GB and is now 2.5GB.
 
Oops, Spartacus said they moved the temp folder to another machine. I assume a UNC path. Of course in this scenario there is ground for problems (network issues, access isues, auth issues etc.). But using another local drive where the current user has full access rights would not lead to any problems.

And yes, there are numerous situations where redirecting temp folders is objectively feasible.
One is when there are programs creating large temp files on a C: drive that is small.
In any case I wouldn't move for the sake of "saving" a SSD's life (well in a regular setup where temp is not very heavily used).
 
Last edited:
There are tons of benefits. just because you don't understand them does not mean they are not there.
im having ahard time picturing it beeing an issue

either the software uses the evn variable and use the new temp folder
or its using some bad hard coded path which would mean I just using another folder.
CPU-z is one of them that seees mto use the temp folder inside windows event if the env variable has been moved. still not an issue .

I asusme you check you conclussion be moving the temp folder again and see that the software stopped to function? and it was not something else that was the issues that got fixed at the same time?


LOL..... start listing those "tons of benefits" Mr. Professor. "tons of benefits" is that a technical term?

I'm an IT guy and I'm self employed. Been in the electronics and IT biz since the early eighties.
My troubleshooting techniques are well developed over many years, I honestly don't need your suggestion to "check you conclussion".

I stand by my suggestion that it's a bad idea to move OS folders around.

I'm done with this Professor.

Oops, Spartacus said they moved the temp folder to another machine. I assume a UNC path.<snip>

Nope. It was not moved to a different machine, never said that.

.
 
Back
Top