How to change the default Windows temporary directory
There are many reasons why would you want to change your default temporary directory in your Windows.
The most obvious reasons is, or rather was, to save some space on your system partition. Even if current drives have large capacity, you may want to keep the temporary "trash" out of your system drive.
But you may also be using some SSD disk for your system partition and want to minimize unneeded data on the disk, which can be stored on a slower disk. Some applications also use the temp folder to store their temporary data, while they perform various task, such as installations, conversions, creating huge files etc..
In any case, its good to know how to change the location of your temporary folder in Microsoft Windows OS.
Changing temporary folder location
- First we need to launch the proper control panel, where we can change the variable values for the temporary directories. You can do that with the Start → Control Panel → System.
-
Once the System control panel is launched, click on the Advanced system settings and inside the now opened system properties windows, select the Advanced tab, if its not the default panel, and click on the Environment Variables... in bottom of the window.
-
In the new Environment Variables window scroll down the System variable tab and find the TEMP and TMP variables. The default values are set in almost all current Windows based computers to C:\Windows\TEMP.
In earlier version of Windows you had the possibility of changing the name your Windows folder during its installation with other name, the default variable in this control panel will reflect that. So if you have labeled your Windows installation WINXP for example, the default temporary directory will be set to to C:\WINXP\TEMP.
-
Now select the TEMP variable and click on Edit... to change its value. A new small window will appear in which you can tweak the values.
-
In the Variable value dialog box change the path to your desired drive and its folder. In our case, we have created
a T: partition on our computer for Trash/Temporary purposes. So we set the path to T:\TEMP. You will need to change the value for both the TEMP and TMP variable. Some programs use TMP while other TEMP, so its best if both have same temporary folder, unless for some reason you want separate directories for both variables. -
After you have changed both values, press OK and restart your computer so your changes will take effect. From now on, every program that is using the windows temporary folders will save its data in your new directory.