Technology Tutorials Windows

Clear Windows Temporary files at a Single Click

  • 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

[box type=”info”]Some files will not be deleted as they would be in use by the application.[/box] 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
      cls
    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.

About the author

Saif Ghole

I am a working professional in an IT Firm who loves technology. I have a big interest in technology, the latest gadgets, and traveling.

Add Comment

Click here to post a comment

Subscribe to Blog via Email

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

Join 38 other subscribers

Amazon