• Sign in to Neowin Faster!

    Create an account on Neowin to contribute and support the site.

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

Recommended Posts

Cyber Akuma    1

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?

Edited by Cyber Akuma

Share this post


Link to post
Share on other sites
exotoxic    642
1 hour ago, Cyber Akuma said:

out-of-memory errors

Nothing to do with drive space.

Share this post


Link to post
Share on other sites
Cyber Akuma    1
4 minutes ago, exotoxic said:

Nothing to do with drive space.

As I said, it had to do with my Swap file being too small, but it would take up too much space on default settings, which is why I tossed it on a different drive.

Share this post


Link to post
Share on other sites
goretsky    963

Hello,

 

In response to your questions:

  1. Just make the change after a restart, and restart immediately afterwards.
  2. No, no.  It depends.  The latter.
  3. No (see 1).
  4. Maybe.  The C:\WINDOWS\TEMP directory, which is pointed to by the Windows system environment variable.

Just keep in mind that some programs may require the temporary file directories be on the C:\ drive in their default, expected locations, and may not work correctly or crash after the change.  For this reason, I don't recommend moving them.

 

Regards,

 

Aryeh Goretsky

 

  • Like 1

Share this post


Link to post
Share on other sites
conna    103

Back in the day before SSD's, I found it extremely performance enhancing to split the OS up between a few drives.  Using XP and an answer file during install and a few tricks I moved the ProfilesDir, AKA "documents and settings" to a separate drive D:\documents and settings.

 The program files default directory was set a the p: drive

example:

ProgramFilesDir="P:\Program Files"
CommonProgramFilesDir="P:\Program Files\Common Files"

 

In the system Variables....

TEMP and TMP was on the T: drive

Swapfile was on a S: drive

Even went as far as relocating the home folder to a separate drive. x:

c :  d: p: s: t: x:

 I had mirrored drives for each and it really fast.  

 

That being said..  Asrock mobos used to push a RAM drive and move all the swap/temp/temporary internet files/etc to it and it worked awesome until windows 10..   

It would be easy to relocate the swap/pagefile and the TMP/TEMP to a SSD.  I just don't think Windows 10 is mature enough to handle it. 

 

 

 

 

 

Share this post


Link to post
Share on other sites
+DevTech    1,340
On 9/30/2018 at 5:09 PM, Cyber Akuma said:

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?

 

TEMP means TEMP. If anything fails to function after clearing TEMP it is a software BUG and the particular program author should be contacted.

 

Once you have two SSDs going there is no point at all to splitting things for performance unless one of the drives has a serious 4K Write Access IOPS issue.

 

1. NO

 

2. NO

 

3. NO

 

4. https://en.wikipedia.org/wiki/NTFS_junction_point

 

Note the article cautions against "Program Files" but anything that is not "Windows 10 Apps" and Microsoft stuff can safely be junctioned...

 

On 11/2/2018 at 11:04 PM, conna said:

Back in the day before SSD's, I found it extremely performance enhancing to split the OS up between a few drives.  Using XP and an answer file during install and a few tricks I moved the ProfilesDir, AKA "documents and settings" to a separate drive D:\documents and settings.

 The program files default directory was set a the p: drive

example:

ProgramFilesDir="P:\Program Files"
CommonProgramFilesDir="P:\Program Files\Common Files"

 

In the system Variables....

TEMP and TMP was on the T: drive

Swapfile was on a S: drive

Even went as far as relocating the home folder to a separate drive. x:

c :  d: p: s: t: x:

 I had mirrored drives for each and it really fast.  

 

That being said..  Asrock mobos used to push a RAM drive and move all the swap/temp/temporary internet files/etc to it and it worked awesome until windows 10..   

It would be easy to relocate the swap/pagefile and the TMP/TEMP to a SSD.  I just don't think Windows 10 is mature enough to handle it. 

 

 

 

 

 

 

Seriously? Comparing Windows 10 to XP?

 

Windows 10 can handle anything. It is the most advanced O/S (used by humans) on Planet Earth. 

 

Windows has user level settings for moving things like "Documents" to another drive. The various environment pointers for TEMP work like they always have. 

 

And you can pretty much bend it completely to your will and make anything go anywhere by use of Junction Points etc:

 

https://en.wikipedia.org/wiki/NTFS_junction_point

 

https://docs.microsoft.com/en-us/windows/desktop/fileio/hard-links-and-junctions

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.