How to Automatically Clean up Temp Files at Windows Boot-up

Posted by Britt Duncan - October 10, 2014

Windows will create some junk files when running itself or a process. These stuffs will take up some disk space on the hard drive. While Disk Cleanup, a utility built in Windows, helps to clear system clutters or outdated restore points that we may not need, there are still many temporary files left. Luckily we can configure Windows to automatically remove those unnecessary temporary files so as to make more space on hard drive. Here’s how.
lotus

Clean Up Temp Files at Windows Start-up by Creating a Batch File

Option One
Step one- Open Notepad, and type the following in it:

rd %temp% /s /q

md %temp%

type-code-in-notepad
Step two- Save the file to the Startup folder, as the path below
%appdata%\microsoft\windows\start menu\programs\startup\cleantemp.bat
save-as-batch
Option Two
Step one- Open the Notepad, type in the following: (replace below with your user name, the same in Step four below)
del /s /q “C:\Users\\AppData\Local\Temp\*.*”
clean-temp-file
Step two- Click File, select Save as
file-save-as
Step three- Name the file as TemKill.bat. And select All Files from Save as type tab. Click Save
save-as-temkill
Step four- Move the file to the following location: (same: put your account user name in )
C:\Users\\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
move-to-startup-folder
Done! And now you can restart your computer to check the trick. You’ll find that there are a lot fewer files in the temp folder.




The Previous:
The Next:

Comments are closed.




Awards

TESTED:  20 Aug