Clean Up Your PC With a Batch File

By | August 25, 2022

 

 

Clean Up Your PC With a Batch File

This tip is for Windows 8.1, Windows 10, and Windows 11

Windows Batch Files

Back in the days of yore — i.e. DOS — batch files were used by geeks to do all sorts of things – including some bad things. Batch files are still as powerful as ever. Geeks use them but that doesn’t mean they’re hard to create. Actually, they are very easy to make. All you need to make one is Notepad, a little code, and a little patience.

So open Notepad right now. Press and hold down the Windows Key — then press the R key. In the command line type Notepad and press Enter. Now that Notepad is open copy and paste the following line (or if you’re a masochist you can type it all in but don’t forget the space after exe and before the slash…):

c:\windows\system32\cleanmgr.exe /dc

Now, and this is VERY important! Make sure you select “All files” in Notepad’s “Save as type:” dialog. If you leave it set as “Text Documents”- your batch file won’t work, because text files cannot execute. (See the helpful image below.)

Cloudeight InfoAVe

Now that you have Save as type “All files” chosen, save your file as

cleanup.bat

Saving it to your desktop is convenient because it’s right there where you can see it. Amaze your friends! Even your enemies!

You are now a geek – you just created a real Windows program!

12 thoughts on “Clean Up Your PC With a Batch File

    1. infoave Post author

      It’s not only a teaching tool on how to make a batch file, but it also runs Windows Disk Cleanup which cleans up your computer.

      Reply
    1. infoave Post author

      No one makes 32-bit computers anymore most people have 64-bit computers.

      Reply
      1. Sherry

        So do I change it to read “c:\windows\system32\cleanmgr.exe /dc”? Or is someone yankin’ my chain here?

        Reply
        1. infoave Post author

          Why would we waste our time trying to yank your chain? If you follow the instructions the only thing you need to change is the file type when saving the batch file using NotePad. There are no quotes in c:\windows\system32\cleanmgr.exe /dc

          Reply
          1. Sherry

            Thank you, I thought maybe someone had hijacked my email and sent a spoof! Sorry for wasting your time. Not quite the response I thought I would get from your organization.

          2. infoave Post author

            If you know us then you know – while we may make a mistake here and there – we would never intentionally waste anyone’s time or yank anyone’s chain with Windows tips. I’m not sure how you took our response, but I’m sorry if my answer offended you. Since the tip was published on our site and the link was to our site, I’m not sure what you were thinking

  1. Dawn

    Don’t knock my buddies! They know more than all of us combined! We would all still be in the “boards” era of computers without them!

    Reply
    1. infoave Post author

      My reply may have been a little short…but it was not meant to be harsh or nasty. Just in a hurry.Thanks for your nice comments and for your support, Dawn.

      Reply

Leave a Reply

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