How to change TEMP folder and allocate free space on your system disk

If you are running out of  space in your system disk, then an easy solution to allocate free space, is to clear (delete) temporary files that were created from Windows services or programs installed on your computer. The cleaning procedure of these files is a safety operation and you don’t lose any critical files that are needed from your system to operate normally. 

Windows uses (minimum) two temporary folders to store all temporary files created by computer usage: The system temporary folder: “C:\Windows\Temp” (that stores all System temporary files) and the user temporary folder that stores temporary files from each user. The user temporary folder is created inside each user’s profile and the full path depends from the operating system installed on the computer:

For Windows 8,7, VIsta OS the user temporary folder path is: %USERPROFILE%\AppData\Local\Temp

&

For Windows XP the user temporary folder path is: %USERPROFILE%\Local Settings\Temp

Moving the Temporary folder to another location helps you easily find and delete all your temporary files (from inside Temporary folder)  and maximize your system disk's free space. This procedure works better  in the case of the existence of a second hard drive on your system.

In this article I’ll show you the way to move the temporary store folders to another disk location.

Step 1: Create a new folder for Temp files:

1. Open Windows explorer and create a new folder at the location that you prefer your temporary files to be stored.

(e.g. “C:\TEMP” or “D:\TEMP” if you have a secondary hard disk).

create temp folder

Step 2: Open Environment Variables settings.

To do this:

1. Right click on the Computer icon and select Properties.

computer properties

2. Click in Advanced system settings on the left pane.

advanced system settings

3. Ask “Yes” on the “UAC Warning” message.

UAC warning

4.  Inside Advanced settings click on “Environment Variables

advanced system properties

5. Inside Environment Variables you see two sections:

a. User variables for the current user (e.g. Admin)

b. System variables

environment variables

From here you’ll be able to change the default location for temporary files.

Step 3. Change Environment Variables values.

A. To change current user's temp files store location:

1. Go inside “User variables” section select the “TEMP” variable and press “Edit”.

User variables

2. In “Variable Value” box delete the default TEMP location (%USERPROFILE%\AppData\Local\Temp) and then type the new TEMP folder location (e.g. C:\TEMP). Press “OK” when finished.

edit user variable

3. Repeat the same procedure for the “TMP” variable.

After you have finished, the “User variables” section should be like this:

user variables sample

5. Press “OK” twice and restart your computer for changes to take effect if you don’t want to change System’s Temp store location.

B. To change System’s temp files store location:

1. Go inside “System variables” section and scroll down until you find “TEMP” & “TMP” variables.

System variables

2. Select the “TEMP” variable and press “Edit”.

edit System variables

3. In “Variable Value” box delete the default TEMP location (%SystemRoot%\TEMP) and then type the new SYSTEM TEMP folder location. (e.g. C:\TEMP). Press “OK” when finished.

System variables change value

4. Repeat the same procedure for the “TMP” variable.

After you have finished, the “User variables” section should be like this:

System variables sample

5. Press “OK” twice and restart your computer for changes to take effect.

From now on, you can easily find and safely delete all the contents inside your new TEMP folder and allocate disk space.

If this article was useful for you, please consider supporting us by making a donation. Even $1 can a make a huge difference for us in our effort to continue to help others while keeping this site free: