Clear Windows Temporary files at a Single Click

by | Jul 15, 2020 | Technology, Tutorials, Windows | 0 comments

  • Follow on Instagram
  • Join us on Telegram
  • Like us on Facebook
  • Follow on Twitter
  • Subscribe to Youtube Channel

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.

Steps to Clear the Windows Temporary Files at a Single Click

Some files will not be deleted as they would be in use by the application.
You have two options to proceed with.

  • 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:

    1. 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
    2. Now go to files and click on “Save As“.
    3. 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(*.*)“.Save As BAT - Windows
    4. That’s it now just click on the “Save” button. Your script is ready.

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.


Submit a Comment

Your email address will not be published. Required fields are marked *

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 43 other subscribers