Home » , , , » Windows Tip: Automatically Clean the Temp Folder During Boot

Windows Tip: Automatically Clean the Temp Folder During Boot

Written By Micah on Friday, February 13, 2015 | 4:44 PM

Windows always has temp files and other junk that’s just taking up space on your hard drive. We’ve covered several ways to clean up the extra junk by using Disk Cleanup to using third-party utilities like CCleaner.

Windows Temp File

First, let’s take a look at the Temp folder in Windows. To get to it in Windows 7 type: %temp% in search field in the Start menu, or on Windows 8.1, hit the Windows Key and type the same thing from the Start menu and hit Enter




That opens the Temp folder, and if you want to clean it out manually, just hit Ctrl + A to  select everything in it, and then Delete. Not all of the files and folders will be deleted though as those files are currently in use.

In fact, you really don’t want to delete any temp files that were created since you booted up the PC for performance sake.




Create a Batch File to Automatically Clean Temp Folder


A lot of space can end up being saved on your hard drive by clearing out the Temp file. And if you shut down your PC every night, you can safely delete the temp files from the previous day during boot.


rd %temp% /s /q

md %temp%

Now, save the file exactly as the path below:
%appdata%\microsoft\windows\start menu\programs\startup\cleantemp.bat
That will create your batch file and save it inside the Startup folder




After creating the batch file, I rebooted my PC and opened the Temp folder, you can see there’s far fewer files in it compared to the image above.




While Windows 8.x doesn’t have a Start menu, it has the Startup folder.


Share this article :

Post a Comment

 
Copyright © 2015. Tips and Tricks Daily - All Rights Reserved
Proudly powered by Blogger