How to clean your Windows Temp folder

Windows temporary files can stack up and waste storage space.

windows file folder bigger

Today's Best Tech Deals

Picked by PCWorld's Editors

Top Deals On Great Products

Picked by Techconnect's Editors

As the name implies, the temp folder contains files that are only needed temporally. Unfortunately, these files don’t always get deleted after their job is done, resulting in wasted drive space.

To open the temp folder, click Start or go to the Windows 8 Search charm, type %temp%, and select the folder that appears.

Once there, you can manually delete files and subfolders. But you probably can’t delete all of them. Windows won’t let you do away with those currently in use. That’s fine. You don’t want to delete those ones anyway.

In fact, you really don’t want to delete any files created since the last time you booted your PC. So if you shut down Windows every night (and I mean shut it down, not sleep or hibernate), and boot clean every morning, you can safely delete any files in Temp not dated today.

Better yet, you can use an old-fashioned, DOS-style batch file to automatically clean out the folder every time you boot. Here’s how:

Open Notepad, and type or paste these two lines:

rd %temp% /s /q
md %temp%

0918 save batch file

Save the file as %appdata%\microsoft\windows\start menu\programs\startup\cleantemp.bat. This will create the batch file, cleantemp.bat, inside your Start menu’s Startup submenu. Everything in that menu loads automatically when you boot.

Yes, Windows 8 doesn’t have a Start menu. But it still has the folder. And the trick still works. Backward compatibility can be a wonderful thing.

Note: When you purchase something after clicking links in our articles, we may earn a small commission. Read our affiliate link policy for more details.
Shop Tech Products at Amazon