Tutorials

Clear Windows Temporary files at a Single Click

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
      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(*.*)“.
    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.

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.

Recent Posts

The Twilight Saga 2008 Review

Twilight is a 2008 American romantic fantasy film. Based on an unusual love story of…

3 years ago

Unbroken A True Story – Review

The epic war true story - Unbroken directed by Angelina Jolie follows the incredible life…

3 years ago

The Dreamseller – Review

O Vendedor de Sonhos - 2016 movie also known as The Dreamseller streamed on Netflix…

3 years ago

The Tomorrow War- Review

The Tomorrow War is a 2021 American military science fiction action film, directed by Chris Mckay…

3 years ago

Chemical Hearts – Movie Review

Chemical Hearts - An unexpected journey of love, loss and most importantly going through the…

3 years ago

This website uses cookies.