Windows operating system is designed in such a way that it will keep creating caches and temporary files by the Windows services or by any 3rd Party application. The temporary files cost you space in your disk which takes more than GB’s. The files keep on piling up and even though they are temporary still don’t have any specific schedule that they get deleted automatically. You have to delete them manually. So let’s see how to automate this process by clearing the Windows temporary files at a single click.
Also read:
Steps to Clear the Windows Temporary Files at a Single Click
- First way if – you can directly download the script created by our team and use it. You can directly download the script from here.
Or you can proceed further with the tutorial and create your own script. Below are the steps:
- Open Note Pad and copy and paste the below code in the file
@echo off del /s /f /q c:\windows\temp\*.* rd /s /q c:\windows\temp md c:\windows\temp del /s /f /q C:\WINDOWS\Prefetch del /s /f /q %temp%\*.* rd /s /q %temp% md %temp% deltree /y c:\windows\tempor~1 deltree /y c:\windows\temp deltree /y c:\windows\tmp deltree /y c:\windows\ff*.tmp deltree /y c:\windows\prefetch deltree /y c:\windows\history deltree /y c:\windows\cookies deltree /y c:\windows\recent deltree /y c:\windows\spool\printers cls
- Now go to files and click on “Save As“.
- Give a file a name and add “.bat” at the end of the name and in the option “Save as type:” select as “All types(*.*)“.
- That’s it now just click on the “Save” button. Your script is ready.
- Open Note Pad and copy and paste the below code in the file
Now you just need to open the file and the script will automatically clear all the temporary files. You can schedule this script to get executed at the Windows startup as well. There will be an article coming up on how to schedule scripts or schedule some activity at a certain time. Also, there is an option called “Storage Sense” which can be used but it has some drawbacks. Will get that covered as well in the coming article.
You can follow us on our Social Media profiles to get the quickest updates. Follow us – Instagram: /StopToExplore, Telegram: /StopToExplore, Facebook: /StopToExplore , Twitter: /StopToExplore, Youtube: /StopToExplore
Did you find this article helpful? If yes then do share it with others.
0 Comments