A DIY Cleanup

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
Being tired of the So-Called Cleanup programs that "Don't", I decided to just write my own.
With a little experience doing that in XP, I've decided to get at it again in Win-11. If XP was a Pack Rat, then Win-11 is an absolute, serious, Hoarder! It never met a temp file it didn't want to keep.:ROFLMAO:
During the development of my "Win11Cleanup.bat" program (batch file), it has removed over 300,000 junk files from this little Acer Slimline PC. It's normally on, from sunup to bedtime.
Today after being on-line all day, I ran my cleanup batch file, and at the end it reports how many files it's removed.
Here's that little report: This was after running for one or two days, at most.
Clean 1-27-23.jpg
I just hope this will serve as a Wake UP call, to those who never think about cleaning out the temp files and other junk from their PC's Hard Drives.
Cheers Mates!
The Shadow :cool:
PS: As a working PC tech, over the years, I've cleaned out Millions of junk files from my customer's PC's.
After a while they can, and do, seriously impact PC performance.
 
Last edited:

RogerOver

Well-known member
Joined
Jun 14, 2022
Messages
363
Reaction score
54
Does it help to not being spied upon by Microsoft (and the backdoors, intentionnaly left open to allow acces for the Government) and other States (from Russia over China to Israel) ?

Nope !

So where is the sense / advantage of cleaning that out ?
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
Oh, by all means, you shouldn't, but I will, and I know a lot of other people who are also very concerned about the junk that's building up daily on their PC's. (Sometimes, thousands of junk files per day )
Sir, your approach is very negative. How is that helping anyone?

My first Cleanup batch file was written years ago, for Windows XP. It worked a treat to keep my HD clean, lean and running GRRRRREAT!
I shared that with my customers at the time, and they loved it.
Recently I've been revamping that old program to clean up Windows 11. With that pretty much finalized, with some HELP from other forum members, I've concentrated on revamping it for Windows 10, and now since I have 12 laptops that need a good cleaning, I'm working on revamping my little Cleanup batch file for use on Windows 8.1 PC's. That's going well. It's definitely time for some good Spring Cleaning!

Y'all have a great day now, Y'hear?
Shadow :cool:
 

Ian

Administrator
Joined
Jun 8, 2021
Messages
212
Reaction score
102
Very interesting - would be interested to know what you scan for in your cleanup tool! Temp files, etc?
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
Well, that's a good question.
There's always the obvious, .tmp files, .bak files, .old files and files in folders named \Temp\.
Then there's the not so obvious files created by Firefox, for instance, that reflects everything that FF sees. It records every page seen, and each page might contain hundreds of parts, and every part is recorded by FF, as one more file.
I can be on FF for just ten minutes, searching, browsing, what ever you want to call it, and FF will generate maybe a thousand files.
I now clean my PC's SSD every day and it's not unusual for my little batch file to remove: (thousands of junk files per day)
Clean 1-27-23.jpg
So, can you even imagine the mess I get in to, when I go in to clean up a PC several years old, that's never had any maintenance at all.
Some will hardly even run.
I use Edge only occasionally, but every time I run my program, there will be a bunch of temp files removed from Edge too. Seems like they just come out of nowhere.

I've been cleaning out and tuning up computers for 40+ years. Personal computers, Business Computers, and even a County Main Frame. So it's not just something I thought about recently.
It's just that now I'm retired and broke, and spend a lot of time at home, so I've got plenty of time to do what I'm doing now, to at least try to educate a small portion of PC operators of how they can improve the performance of their PC's, by doing regular Junk Removal.
I have nothing for sale, lease or rent! All my little tips and tricks are free to anyone wanting them.
And I really want to thank those who have supplied me with lines of code that I cannot create for myself.
It's really been a Group Effort.
:cool:
 
Last edited:

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
And, the average PC user has no clue. When the little PC finally grinds down to a halt or near halt, and they take it to a repair shop, I really doubt that the PC Repair Tech explains it to them. It's more like, "Ok, it's all fixed, that'll be $125 please." And all they did was clean out the junk, and maybe blow the dust bunnies out of the cooling fan(s).

One dear sweet old lady called me one day, because her computer was not working, and a neighbor suggested that she call me.
Well, her WD hard drive had crashed. When I told her, she said she had just had that installed down at the local Computer shop, just a few months prior. Well I looked at the date on the drive and it was actually five years old. She was furious! So typical.

Y'all have a great day now, Y'hear?
Shadow :cool:
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
As the old Western song said, "I'm Back in the saddle again!"

I have a very old eMachine, with an IDE hard drive in it, and it's running Windows XP.
Does anyone here remember that one? (no replies required)

Well, today I fired it up for the first time in a while, and started to re-work my very old "XPCleanup.bat" program that I wrote years ago.
Actually, I pushed that one aside, and started reworking my "Win11Cleanup.bat" program, to fit Windows XP.
All the path statements had to be re-written, for things like the Firefox Temporary Internet Files.
There was no Edge in XP, so that line got deleted.
The line to empty the recycle bid didn't work, so that one bit the dust too.

Finally, on the first test run, when it came to cleaning out the Firefox Cache, the files being deleted scrolled off the top of the screen for several minutes. As I mentioned somewhere, recently, Firefox numbers its temp files sequentially, in Hexadecimal. When I converted the Hex number of the last file, to Decimal, it came out to 65,529 (Temporary Internet Files) That's a BUNCH! :eek:
I have to remind myself, that every web page that Firefox ever saw, on this PC, was made up of several to many individual items, and every one is saved as a separate file. So the number of Cache files builds up really fast.
Well, they're GONE now thanks to the New and Improved "XPCleanup.bat" program (DOS Batch File)

I hear that some folks up North are still fighting with ICE and SNOW, but today it's sunny and 86 degrees F, here in Central FL.

Y'all come on down!
:cool:
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
Well, it's been a while, since I started working on my Cleanup11.bat batch file. I'm still tweaking and tuning it for Perfection. And, it just keeps getting Betterer and Betterer!
After not running my program for a couple of days, I ran it and got this final report:

Clean 3-1-23.jpg
With the windows still open on my desktop, I scrolled back up through all the files that had been deleted.
I was surprised to find that I had forgotten three basic lines of code at the very first of the batch file.

Here are those three simple lines of code:

Del /F /S /Q C:\*.tmp
Del /F /S /Q C:\*.bac
Del /F /S /Q C:\*/old

And after entering those three lines into my program (batch file) I ran the program again, and got this
report.

Clean 3-1-23.2.jpg
WOW! 3,517 junk files removed from just those three little lines of code.

Surely, there is someone out there who is interested in cleaning up their own computer. Eh?

:cool:
 

Bighorn

Well-known member
Joined
Feb 27, 2023
Messages
452
Reaction score
70
I was going to try it but think there's an error in the last of the 3 lines:

Here are those three simple lines of code:

Del /F /S /Q C:\*.tmp
Del /F /S /Q C:\*.bac
Del /F /S /Q C:\*/old

And after entering those three lines into my program (batch file) I ran the program again, and got this
report.
 

davehc

Well-known member
Joined
Jun 24, 2021
Messages
618
Reaction score
146
Well, it's been a while, since I started working on my Cleanup11.bat batch file. I'm still tweaking and tuning it for Perfection. And, it just keeps getting Betterer and Betterer!
After not running my program for a couple of days, I ran it and got this final report:

View attachment 920
With the windows still open on my desktop, I scrolled back up through all the files that had been deleted.
I was surprised to find that I had forgotten three basic lines of code at the very first of the batch file.

Here are those three simple lines of code:

Del /F /S /Q C:\*.tmp
Del /F /S /Q C:\*.bac
Del /F /S /Q C:\*/old

And after entering those three lines into my program (batch file) I ran the program again, and got this
report.

View attachment 921
WOW! 3,517 junk files removed from just those three little lines of code.

Surely, there is someone out there who is interested in cleaning up their own computer. Eh?

:cool:
I think the problem is that most are satisfied with the cleaning facilities built in, or, if they have further wishes, one of the more trustworthy proprietry offers - Ccleaner for example.
If a user has ample space, and no visible signs of the OS slowing down, they are satisfied.
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
Dave, for decades, I made a living taking service calls on PC's, with many of those owned by people who barely knew how to turn the PC on and they would push the ON button till the PC shut down.
Compared to those (average) computer users, you're a Rocket Scientist.
They don't know or care that their PC is loading up with temporary internet files and Tracking Cookies, till one day the computer just stops.
Sometimes, it would take me hours, to just clean out enough garbage to get the PC to run good enough so I could tweak and tune it for maximum efficiency.
I would literally clean out Gigabytes of garbage. And hundreds of thousands of Tracking Cookies, using Super Anti Spyware. Hearing the comment "Heck! It didn't run that good when it was new!" was an everyday affair.
Then I would give the user/owner some little programs to help them keep their PC clean and running good.
And I'd even give them a little printed booklet of instructions on how to run those programs.
The little ol' ladies really loved that personal touch.

Can I do anything less for my own PC?
This little Acer Slimline PC, has a bios date of 2008, and in NO WAY is it Win-11 compatible, but, I've got this little PC running Win-11/Pro/64 as good as it ever ran Windows 7 or 8.1. It's what I do!
 

davehc

Well-known member
Joined
Jun 24, 2021
Messages
618
Reaction score
146
Totally with you:D

Every weekend I spend something like 30 minutes going through my computers and cleaning them with all means available - mstly manual. I then make Macrium backups.
Getting a little over the hil now, but ( quote "ompared to those (average) computer users, you're a Rocket Scientist.") I have created a local group of similar oldies, who, in several cases, know how to switch on a computer and check their mail.
It keeps me occupied and , ogf course, is good for my ego in my old age.
I am sure you have had the xperience, but, believe me, some of their requests for help border on the extreme!!!
 

davehc

Well-known member
Joined
Jun 24, 2021
Messages
618
Reaction score
146
Totally with you:D

Every weekend I spend something like 30 minutes going through my computers and cleaning them with all means available - mstly manual. I then make Macrium backups.
Getting a little over the hil now, but ( quote "ompared to those (average) computer users, you're a Rocket Scientist.") I have created a local group of similar oldies, who, in several cases, know how to switch on a computer and check their mail.
It keeps me occupied and , ogf course, is good for my ego in my old age.
I am sure you have had the xperience, but, believe me, some of their requests for help border on the extreme!!!
Lol• and please excuse my constant misspelling. Most of my replies are away from home and done on my mobile. My fat fingers will never get the hang of it. I could check, but am probably in too much of a hurryl:mad::mad::mad:
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
For years, I've looked at every so called "Cleanup" program that's come down the pike.
One or two have hit the mark, as being worth the Hard Drive space to give them a home, but so many others have fallen flat on their face, and definitely not worth the space they take up.
I developed the Batch File concept many years ago, with a little invisible Cleaner program that I'd stick in the Startup folder, so it would run on every boot up, quietly and invisibly.
It only takes a few seconds, to remove yesterday's temporary internet files. And that's something that most of the Professional programs don't do.
But, don't get me wrong.....there are some really good Utility programs out there, that do so much more than just clean out junk. "WinUtilities" for instance, is a great little program and I do run it at least once a week, to dump some junk, and clean out the garbage that builds up in the registry.
I first saw it at a friends house one day, while I was doing a little tune up on his PC. He had bought the program, and when I saw it run, I went right home and bought it for myself.

Years ago, there was PC Tools, a great Utility package. (for DOS)
Then there was "Easy Cleaner", another great little program, that was never upgraded for our modern day Windows.
It seems like the the best programs, have fallen by the wayside.
Even AVG put out a package called something like "PC Tune-Up". It was a great little package, that could even optimize one's Internet Connection. I still have it, and run it occasionally.

One reason I kind of go crazy about getting rid of every file that I can, is to keep down the size of my Backup Image Files. I do a massive cleanup before I do my weekly C: drive backup.
Which reminds me....it's time for my weekly Cleanup and Backup.
Cheers mates!
Shadow :cool:
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
I've not given up. I'm still tweaking and tuning my little Cleanup.bat program. And every so often, someone will mention a location where junk files like to hide, and that gets added to my batch file.
The last one of those, was: (as I added it to my batch file)

Del /F /S /Q C:\Users\%UserName%\AppData\Local\Temp\*.*

There wasn't a lot in that temp folder, but it was all junk and now it's Gone!
Cheers Mates!
Shadow :cool:
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
Well, it's May 22, SS pay day for me, and we're getting some badly needed rain.

I'm still running my Cleanup batch file, almost every day, and it's still knocking out thousands of garbage files.
I've sent my program code out to several people who have requested it, but I've not got back a lot of results, yet.
One fellow even wants to convert it to "Power Shell" code. Well, that's fine with me. Whatever it takes to have a clean PC, is just fine.

I use lots of Batch files in my setup of Windows, and in my everyday life. All my data backups are done with Batch Files, using XCOPY.
They are nothing strange to Windows, because they are based on parts of Windows that originated in DOS, many years ago.
One might say that DOS is the first language of Windows. So there is nothing to buy, or download, or even install, it's all right there just under the covers, of Windows, just waiting to be used.
I've always preferred to use what I've already got available to me, rather than going out and buying something new.
For instance, I have a 56 year old vacuum cleaner, that I rebuilt, with new motor bearings and a new hose, and it runs as good as it did back in 1967, when I received it as a gift.
I know, we live in a "throw away" society, but I never throw something away if I can just fix it.

Y'all have a really great day now, Y'hear?
Shadow :cool:
 
Last edited:

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
WOW! That last post was in May. A lot has happened since then.
I'm still tweaking and adding cosmetics to my Cleanup.Bat program and it just works better ever time I tweak it.

And, I'm still sending it to anyone who asks for it.
Originally, it only removed the Temporary Internet files from I.E., Firefox and Edge, but since then I've added Chrome to the list.
That's by request, and not because I personally use Chrome, which I don't. I did install it on one laptop, just for testing purposes.

Here's one of my latest cleanup reports:
Cleanup 12-18-23.jpg
That was after a very busy two days.
At the very minimum, every file will take up at least 1kilobyte of disk space. And, many are much larger than just 1Kilobyte.

Happy New Year, Mates,
Shadow :cool:
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
269
Reaction score
44
Here we are, almost a year after this thread started, and I'm still trying to improve my "Cleanup.bat" program (DOS Batch File).

I'm still running my cleanup batch file, almost daily, and still removing thousands of junk files.

And I'm still sending it out to anyone who asks for it. It's now being used in several US states and five foreign countries.

I never read .log files. They just collect, like forever, and take up space on my SSD and in my weekly Backup Image files.
So, I just added one more line to my batch file:

Del /F /S /Q C:\*.log

On first run, it deleted hundreds of totally useless .log files.

Welcome to 2024!

Cheers Mates.
Shadow :cool:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Cleanup of Hard Drive 7

Top