To change the TEMP folder location in Windows, first create a new folder on the desired drive (e.g., D:\Temp), then update the TEMP and TMP environment variables for both user and system (if needed) via System Properties > Advanced > Environment Variables, assign full control permissions to the new folder, restart your computer, and verify the change by running echo %TEMP% in Command Prompt—ensure all four variables are correctly set and avoid using network or removable drives.
Changing the TEMP folder location in Windows can help improve performance—especially if you're redirecting it to an SSD—or free up space on your system drive. The TEMP folder is used by Windows and applications to store temporary files during operations. Here’s how to safely change its location.

Why Change the TEMP Folder Location?
By default, Windows uses a folder like C:\Users\[Username]\AppData\Local\Temp
for temporary files. If your C: drive is small or slow (e.g., an old HDD), moving the TEMP folder to another drive (like an SSD or larger drive) can:
- Reduce clutter on the system drive
- Improve app performance
- Prevent "disk full" errors during large operations
Step 1: Create a New TEMP Folder
First, create a new folder on the drive where you want to move TEMP.

- Open File Explorer.
- Navigate to the drive (e.g.,
D:\
). - Right-click → New → Folder.
- Name it something like
Temp
→D:\Temp
.
Optional: Give the folder appropriate permissions. Right-click → Properties → Security → ensure your user account has Full Control.
Step 2: Change Environment Variables
Windows uses two environment variables for temp paths:

-
TEMP
– for the current user -
TMP
– also for the current user -
System TEMP
– used by system services (affects all users)
You should update both user and system variables.
Update User TEMP and TMP (Recommended for most users)
- Press Win R, type
sysdm.cpl
, and press Enter. - Go to the Advanced tab.
- Click Environment Variables.
- Under User variables, select
TEMP
, then click Edit. - Change the value to your new path (e.g.,
D:\Temp
). - Repeat for
TMP
(change it to the same path). - Click OK.
Update System TEMP and TMP (Optional, for system-wide changes)
?? Be cautious—some system processes expect the default path.
- In the same Environment Variables window, look under System variables.
- Edit
TEMP
andTMP
(notTemp
, which may also exist). - Change both to the same new path (e.g.,
D:\Temp
). - Click OK to save.
Step 3: Restart Your Computer
After changing the variables:
- Restart your PC to ensure all running processes pick up the new path.
- Some apps and services only read the TEMP location at startup.
Step 4: Verify the Change
To confirm the new TEMP location is active:
- Press Win R, type
cmd
, and press Enter. - In Command Prompt, run:
echo %TEMP%
- It should display your new path (e.g.,
D:\Temp
).
You can also test by creating a temporary file via an app or script and checking where it’s saved.
Tips and Warnings
- Permissions matter: Make sure your user account and SYSTEM have full access to the new TEMP folder.
-
Don’t delete old temp files immediately: Wait until you confirm everything works, then manually delete files in the old
C:\Users\...\AppData\Local\Temp
. - Some apps may still use the old path: Legacy or poorly coded software might hardcode the temp path. Monitor for errors.
- Avoid network or removable drives: Don’t set TEMP to a network location or USB drive—this can cause crashes or slowdowns.
Changing the TEMP folder isn’t complicated, but it’s easy to miss one of the variables (TEMP
, TMP
, user vs system). Double-check all four if you’re having issues.
Basically, create the folder, update the environment variables, and restart. That’s it.
The above is the detailed content of How to change the TEMP folder location in Windows. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

The problem of slow booting can be solved by the following methods: 1. Check and disable unnecessary booting programs; 2. Turn off the quick boot function; 3. Update the driver and check disk health; 4. Adjust the number of processor cores (only for advanced users). For Windows 11 systems, first, the default self-start software such as QQ and WeChat are disabled through the task manager to improve the startup speed; if you use dual systems or old hardware, you can enter the power option to turn off the quick boot function; second, use the device manager to update the driver and run the chkdsk command to fix disk errors, and it is recommended to replace the mechanical hard disk with SSD; for multi-core CPU users, the kernel parameters can be adjusted through bcdedit and msconfig to optimize the startup efficiency. Most cases can be corrected by basic investigation

If you're having trouble reading your desktop icons' text or simply want to personalize your desktop look, you may be looking for a way to change the font color on desktop icons in Windows 11. Unfortunately, Windows 11 doesn't offer an easy built-in

Fixed Windows 11 Google Chrome not opening Google Chrome is the most popular browser right now, but even it sometimes requires help to open on Windows. Then follow the on-screen instructions to complete the process. After completing the above steps, launch Google Chrome again to see if it works properly now. 5. Delete Chrome User Profile If you are still having problems, it may be time to delete Chrome User Profile. This will delete all your personal information, so be sure to back up all relevant data. Typically, you delete the Chrome user profile through the browser itself. But given that you can't open it, here's another way: Turn on Windo

When Windows cannot detect a second monitor, first check whether the physical connection is normal, including power supply, cable plug-in and interface compatibility, and try to replace the cable or adapter; secondly, update or reinstall the graphics card driver through the Device Manager, and roll back the driver version if necessary; then manually click "Detection" in the display settings to identify the monitor to confirm whether it is correctly identified by the system; finally check whether the monitor input source is switched to the corresponding interface, and confirm whether the graphics card output port connected to the cable is correct. Following the above steps to check in turn, most dual-screen recognition problems can usually be solved.

Have problems uploading files in Google Chrome? This may be annoying, right? Whether you are attaching documents to emails, sharing images on social media, or submitting important files for work or school, a smooth file upload process is crucial. So, it can be frustrating if your file uploads continue to fail in Chrome on Windows PC. If you're not ready to give up your favorite browser, here are some tips for fixes that can't upload files on Windows Google Chrome 1. Start with Universal Repair Before we learn about any advanced troubleshooting tips, it's best to try some of the basic solutions mentioned below. Troubleshooting Internet connection issues: Internet connection

Mini PCs have undergone

You can use it temporarily by upgrading genuine Win10, using the education plan or not activating temporary use. Specifically, it includes: 1. Free upgrade from activated Windows 10 to Windows 11; 2. Students or specific organization members obtain authorization through the Microsoft Education Program; 3. Short-term tests can be used directly without activation, but their functions are limited; 4. Beware of free online key traps, and it is recommended to purchase authorization or confirm upgrade conditions through formal channels.
