You Can Make a Batch File to Clean Up Your PC… Yes You Can!
First things first” This tip will work on Windows 7, Windows 8.1 and all versions of Windows 10. So, my friends, have at it!
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 there 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…):
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.)
Now that you have Save as type “All files” chosen, save your file as cleanup.bat . Saving it to your desktop is highly convenient because it’s right there where you can see it. Amaze your friends! Even your enemies! You are a geek – you just created a real Windows program!
Not a geek? Here’s another way to do it. This creates a shortcut to Windows Disk Cleanup. It’s not as geeky but you can pin the shortcut your taskbar or Start menu if you choose. Click the shortcut and run Windows Disk Cleanup. Just like that!
Ready. Press Windows Key to go to your desktop. Right-click on an empty area of your desktop (i.e. not on an icon 🙂 ). Now choose “New” then “Shortcut” and copy & paste the following line:
Then click “Next” and give your Disk Cleanup Shortcut a name:
And click “Finish”.
If you want your shortcut to appear on your start menu or taskbar (or both), just right-click it and choose “Pin to start” or “Pin to taskbar” or both. See?
Soooo… whether you want to play around and make a batch file and amaze your cronies with your computer savvy, or if you just want a handy shortcut to clean up your computer, you now know how, right?
That’s a rhetorical question, EB. They don’t need to answer it.