This is a dead simple trick to delete those pesky temporary files that build up over time in Windows 7 — and the best part is you can set it and forget it.
Step #1 — Create a new text document on your desktop, then rename it to cleanup.bat (or a name of your choosing, but keep the .bat extension). Note: you need file extensions enabled to do this…My Computer > Organize > View tab > uncheck “Hide extensions for known file types.”
Step #2 — edit your new file (right click and choose “Edit”) and add these commands:
@ECHO OFF rmdir %TEMP% /q /s mkdir %TEMP% rmdir %WINDIR%\TEMP /q /s mkdir %WINDIR%\TEMP rmdir %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files /q /s mkdir %LOCALAPPDATA%\Microsoft\Windows\Temporary Internet Files
Don’t forget to save your file!
Step #3 — create a shortcut to the file in your startup menu. Or since it’s so tiny, you could just move the file into your startup folder.
Step #4 — enjoy as temporary files are cleaned each time your system boots up.
Notes:
- You can also add the batch file as a scheduled task, if you’d like to change the conditions that cause it to run (at a certain time, for example). Press Window key + R to bring up the run menu, and then enter taskschd.msc /s.
- CCleaner is a great program that really scrubs your system for unneeded/unwanted files.
You may also like: