Temporary files are a common tool for Windows to store information necessary to run different programs.
Once you close the program that uses the temporary files, Windows deletes them because they’re no longer needed.
If Windows can’t remove those files for some reason, they pile up until there’s no more room in your Drive C, which significantly slows down your computer.
To delete the contents in your temp folder, you need access to the folder, which sometimes isn’t possible.
Another situation where you may need to access the temp folder is when installing programs that need to write temporary files to that folder.
Why Can’t I Access My Temp Folder?
You can’t access your temp folder because your Windows account doesn’t have administrator permissions.
Therefore, User Account Control (UAC) prevents you from opening the file.
That’s a common issue in Windows 7 and later because administrator accounts created by users still don’t have full privileges.
You have a few options to resolve the problem:
- Bring UAC down to the lowest level.
- Activate the built-in administrator account, which has full privileges.
- Modify the folder’s permissions so any user can gain access.
- Replace the current temp folder with a new one.
Although it’s more convenient, the first solution has a higher security risk because you’re essentially disabling access protection.
As a result, any executable file, including malware and viruses, can run on your computer without getting blocked.
If you choose this method, make sure to return the UAC settings to their normal levels.
On the other hand, the second solution adds an extra account to your Windows, meaning you’ll have to choose which account to log in to every time your Windows boots up.
That’s especially annoying if your computer’s slow and you leave it for a few minutes to load while getting ready to start working.
The good news is that you can turn the administrator account back off once you’ve emptied your temp folder.
The other solutions require some technical expertise, so we don’t advise them if you’re not a tech-savvy user.
In the sections below, we’ll talk in detail about each method.
Solution 1: Turn Off User Account Control
User Account Control (UAC) is a feature in Windows that prevents malware and harmful files from running on your computer and causing damage.
When UAC is on, all the apps run without administrator permissions unless you right-click on the .exe file and click “Run as administrator.”
However, that approach doesn’t work with folders.
To open a folder that requires admin privileges, you need to turn off UAC.
Here’s how you can do that:
- Open the Start Menu and type in Control Panel.
- Locate User Accounts and click on it.
- Navigate to User Accounts > Change User Account Control settings.
- Bring the slider down to Never Notify.
- Click OK.
Then try to open your temp folder by typing in %temp% in the Run menu.
Note: Don’t forget to return the UAC settings to the default level, “Notify me when apps try to make changes to my computer,” once you’ve purged your temp folder.
Otherwise, you’re effectively giving malware and malicious software a free pass to run on your computer without your knowledge.
Solution 2: Activate The Built-In Admin Account In Windows
Many people don’t know that Windows 7 and later come with a hidden account with full admin privileges, including software installation, modifying files and folders, and making changes to other Windows accounts.
Even if you’ve assigned yourself as the administrator during Windows installation, your account probably doesn’t have the same level of access as this hidden admin account.
If the first solution doesn’t work for you, this one most likely will.
Here are the steps to turning on the hidden admin account:
- Go to your Desktop, find This PC, and right-click on it.
- Click Manage.
- From the left-hand sidebar, click on Local Users and Groups.
- Double click on Users.
- Locate “Administrator” on the list. The description should say, “Built-in account for administering the computer/domain.”
- Double click on the account.
- On the dialog, uncheck “Account is disabled.”
- Click OK.
- Restart your computer.
If you prefer typing in commands, here’s how you can enable the built-in admin account:
- Press the Start Key + R.
- Type in cmd and press Alt + Enter (to open the command line utility as an administrator).
- Once the window opens, enter the following command:
net user administrator /active:yes
- Wait a few seconds to receive the confirmation message.
- Restart your computer.
Once your computer turns on, you should see the new admin account.
Log in to that account, and try to access your temp folder.
Note: Once you’ve emptied the temp folder, you can turn off the admin account by navigating to the same path.
This way, you’ll only have your account, and Windows will log in as soon as you turn on the computer.
When you have more than one account, Windows will wait for your command before it can load the startup apps.
This situation becomes frustrating if you don’t want to wait for the apps to load when you get back to your desk after starting your computer.
Solution 3: Adjust The Access Permissions On The Temp Folder
Instead of using an account with high-level permissions, you can bring down the required access level for the temp folder.
To do that, you need to access the folder’s parent folder.
Navigate to C:\Users\UserName\AppData\Local (where UserName is the name assigned to your user account).
Then follow these steps:
- Right-click on Temp and select Properties.
- Click on Security.
- Under Groups or user names, select Everyone.
- In the permissions section, check Full Permissions under the Allow column.
- Click OK.
If you can’t see the Everyone group, you can add it by following these instructions:
- In the Security tab, click Edit.
- Click Add.
- Under object names, type in “everyone.”
- Click Check Names.
- Click OK.
Now double click the Temp folder to see if it opens without trouble.
Unlike the previous solutions, you don’t have to reverse your changes.
Solution 4: Creating A New Temp Folder
If you enjoy going deep under your operating system’s hood, this solution will give you the satisfaction of doing so.
You can create a new folder, name it “Temp,” and ask Windows to recognize it as the new temp folder.
The solution sounds simple, but you have to be careful not to make mistakes.
Here’s what you need to do:
- Create a new folder in your Windows drive (usually Drive C) and name it Temp.
- Go to your desktop, right-click on This PC, and select Properties.
- From the left-hand sidebar, select Advanced system settings.
- Navigate to Advanced.
- Select Environment variables.
- Under User variables for UserName, select Temp.
- Click Edit.
- Replace the current value with the address of the folder you created (e.g., C:\Temp).
- Click OK twice and close the window.
- Restart your computer for the changes to take effect.
Note: Environment variables store locations that Windows and other programs need to agree on to work together effectively.
They store the address of the temp folder, the directory to install files, the Windows folder, and more.
There are about forty of these variables, and they’re slightly different from one version of Windows to another.
Note 2: Tweaking your environment variables can have unintended consequences. Create a full backup of your critical data and set a restore point before applying the changes.
If you don’t know how to create a system restore point in Windows, watch the following video:
What Does The Temp Folder Do?
The temp folder stores data that different programs create when they’re running.
This data doesn’t need to be stored permanently because it’s not valuable to the user—it’s usually the result of calculations and operations that don’t directly generate the final output.
For example, a video editing app may create temporary files to store the user’s modifications before rendering the final video.
On a word processing app, the temporary files store your text and styles before you press Ctrl + S.
The folder is also very helpful when you want to install a new program.
The program’s executable and setting files are temporarily transferred to the temp folder until it gets registered with your Windows, and the main files are copied to the Program Files folder.
Windows also uses this folder to store temp files that make the Windows services run.
These temporary files have multiple advantages:
- They allow the user to undo changes they make.
- They reduce the operational load by temporarily storing calculation results.
- In some cases, they can be used to restore your work if a program crashes.
- If a program or installation process crashes, critical system files remain unaffected because all temporary files are kept in a separate folder.
When you close a program, or an installation is complete, the program deletes the temporary files because they’ve fulfilled their purpose.
However, sometimes there’s a glitch or crash, and the temp files stay on your drive.
What’s more, some poorly-coded programs don’t even bother to remove their temp files.
Although these files are usually tiny (around 1 KB), they can add up quickly.
Sometimes, especially after a program crashes, there can be huge temp files—even up to a few gigabytes.
Depending on your drive size, your drive C will fill up sooner or later, and you’ll have to delete these temp files.
One way to do that is to type in %temp% in your Run command, open the temp folder, and delete all the files.
Of course, Windows will always use a few files, and you can’t delete those.
The other files are easy to delete, and you’ll get a large amount of disk space back.
Another way to empty your Temp folder is through the Disk Cleaner utility in Windows.
Here are the steps to follow:
- Right-click on your Drive C and select Properties.
- Under the General tab, click Disk Cleanup.
- Check Temporary Files.
- Click OK.
Frequently Asked Questions About The Temp Folder
1. Is It Okay To Delete The Temp Folder?
It’s harmless to delete the files in your temp folder as they’re not critical system files.
Windows always has a few temporary files in use, so you won’t be able to delete all the files in that folder.
However, to delete the Temp folder itself, you need administrator privileges.
Even if you manage to delete the folder, Windows will quickly create a new one because the temp folder is necessary for keeping Windows operational.
2. How Many Temp Folders Does Windows Have?
Each user account has a dedicated temp folder.
Therefore, the number of temp folders will equal the number of user accounts in your Windows.
Moreover, each program can maintain a dedicated temp folder in its subdirectory under Program Files.
Finally, there’s also a Temp folder in C:\Windows\Temp, which is exclusively used for Windows operations.
Programs don’t have access to this folder.
Instead, they keep their temporary files in C:\Users\UserName\AppData\Temp.
3. How Does %temp% Work?
The percentage signs are regular expression (regex) operators.
When you type in %temp% in your Run command, Windows will search through the environment variables and return the values of the first variable whose name contains the word “temp.”
You may also use %tmp% to open the same subdirectory under AppData.
However, there’s no environment variable for the C:\Windows\Temp directory as its use is exclusive to Windows.
Leave a Reply