Eliminating Unwanted Files (Rubbish) from Microsoft Edge - Tutorial

Xploit Machine

Well-known member
Joined
Nov 29, 2022
Messages
1,119
Reaction score
98
Eliminating Unwanted Files (Rubbish) from Microsoft Edge - Tutorial
Here's a personal video of mine removing some unwanted stuffs from folders related to Microsoft Edge, since you will be seeing I just keep in the LOCALED folder only "English" doesn't mean I dont have translation access through websites, it still does works fine .. the rest is fine (additionally you can fine *.old;*.bak) files to remove and it wont affect your cookies or saved logon information. Basically these workout will remove approx. 200MB of resident unwanted files.

Posting here since I do not have permission to start new topic in the "Articles" section. TQ​

 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
What about 'Temporary Internet Files'? Those can stack up faster than old newspapers, and junk Mail.

I use this line, in my "Cleanup11.bat" batch file, to get rid of Edge's temporary Internet files.
del /F /S /Q "C:\Users\%Username%\AppData\Local\Microsoft\Edge\User Data\Default\Cache\*.*"

That could be run from a command prompt, or from a Batch File.

:cool:
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
If you "just don't use" everything in Windows that gives you any problems, You'll be back to DOS.
Edge isn't my favorite browser, but it comes in handy sometimes. I've not tried, yet, but you might be able to program it to delete temp files on Exit.
I just found, it can be done.
:cool:
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
The little three letter files, can easily be deleted by a few lines in a batch file, or by just typing them into a command prompt.
Del /f/s/q C:\*.bak
Del /f/s/q C:\*.tmp
Del /f/s/q C:\*.old
And so on and so on.
Give it a try!
Cheers Mates!
Shadow :cool:
PS: For fun, I just did that to find and delete all of the .old files. The command deleted two screens of .old files from Edge alone.
And quite a few from other locations. Now my entire PC is .OLD free. lol
 

davehc

Well-known member
Joined
Jun 24, 2021
Messages
627
Reaction score
151
I do keep my computers clean, but, for interest, what were the two screens of "old" files. Are you referring to the history?
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
I'm not sure, because I didn't save them. It's like watching an express train go by. It's all just a blurr.
But evidently Edge keeps old and probably out of date info as .old files. There were sure a Bunch of them!
They are not the same as the Temporary Internet Files, so have to be deleted separately.
So, I've added that line permanently to my Cleanup batch file.
You might call it a "Global" command, because it searches the entire C: drive for any file ending in .old
It's the same with the other two commands that take out all of the .bak and .tmp files.

Why don't you just try it yourself and you'll surely see what I saw. Eh?

I've found that PC Cleaning can become infectious!
For years, I've run a little program called simply "TempCleaner.exe", from my Startup folder. It would take several seconds to run and displayed a little window on the desktop screen while it ran. I don't know exactly what it cleaned out, but it certainly did not clean out the Temporary Internet Files from either Edge or Firefox. So I've replaced it with a little four line batch file of my own, to clean out those Cashe's and also empty the Recycle Bin. That only takes a couple of seconds to run and then is Gone. If I blink, I miss it. lol

:cool:
 
Last edited:

davehc

Well-known member
Joined
Jun 24, 2021
Messages
627
Reaction score
151
Got this from the command:
1675175408175.png
And a nil return with the normal windows search.
I do regularly use the disk clean-up and the facility in the settings (Storage) Maybe that takes care of it? Further investigation shows the “old” files are in the cache - those I also clean out from time to time. Must confess, though, that “cleaning “ has almost become an obsession/hobby. I do a ðeal of it manually.
By the way, would not you bat file also remove the windows old file, which could be hazardous for thos wanting to return to 10
 
Last edited:

davehc

Well-known member
Joined
Jun 24, 2021
Messages
627
Reaction score
151
best removing edge altogether it safer and less hassle ( no adds )
No adds? Curious! What are you using? I am not at all certain, but I dont think the choice of a browser has a lot to do with adds??
Fwiw. I am ok with Edge.í
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
Edge is like an old dog that won't hunt, and barks at anything that walks, flies, crawls or even breaths hard.
But, we love that old dog, and just keep him around for sentimental reasons.
Like, I kept I.E. till it just died a natural death.

I've found out one thing about Win-11,,,, it's just full of little idiosyncrasies, and it can be darn persnickety. Like an old aunt.
Dave, if I saw the complete CMD window, the red lines might make more sense. Were you running that as an Administrator?
I just ran the same command, or what appears to be the same command and got this:

Del Old..jpg
For security reasons, I blocked out my name where the two white areas are now. But the command ran just fine, and yes, I've incorporated it into the beginning of my Cleanup Batch File.
Before I ran the Del command, I did change directory back to the ROOT Directory, if that makes any difference.

Microsoft lies a lot too. I have the "Ver" command at the top of my batch file I and see that it certainly does NOT print out version 11.
And you see here, at the command prompt, likewise....no version 11.

Chew on this one, for a while: I was at a friends house today, tuning up and cleaning up his one BIG desktop PC, that I built for him a few years back, and his two HP Laptops, bought several years apart. The oldest one, maybe five years old, came with Windows 10 on it, and I know this because I've worked on it before.
But today when we tried to boot it up, it sat there for probably twenty minutes getting updates. WTH?
When it finally did boot up to Windows, I couldn't help notice all the taskbar icons clustered together in the Center of the Taskbar. WTH?
That SUKKA was running Windows 11, and neither my friend or his wife had done an upgrade from 10 to 11.
So I ask the resident Experts, "Can Windows 10 just upgrade itself to Windows 11, with no human intervention?" OR WARNING!???
And, why would it?

I'm sitting there staring at it, and I can't believe what I'm obviously seeing! So all I could do is begin my Cleanup and Tuneup for Windows 11.
I installed my Cleanup Batch program for Windows 11, and the file counter went out to lunch. So did we. :ROFLMAO:

Did I mention, that little ol' HP laptop seemed to be running REALLY SLOW, even with an 8-core CPU and 8GB of ram.
And when we got back, the file count (almost 2 million files) had ceased and the cleanup had begun.
At the final count, the junk files removed was over 18k. I had expected at least double that. (It's his wife's Pc and she hardly uses it except for Skype, with friends in the Old Country. There were a few Tracking Cookies and other junk that I had to take care of.

But that really topped off my 40+ years as a computer tech, to have a PC just up and change OS's all by itself.
And, there wasn't even a "Windows Old" folder to delete. I looked!
Can I hear an Amen?

:cool:
 
Last edited:

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
Got this from the command:
View attachment 850
And a nil return with the normal windows search.
I do regularly use the disk clean-up and the facility in the settings (Storage) Maybe that takes care of it? Further investigation shows the “old” files are in the cache - those I also clean out from time to time. Must confess, though, that “cleaning “ has almost become an obsession/hobby. I do a ðeal of it manually.
By the way, would not you bat file also remove the windows old file, which could be hazardous for thos wanting to return to 10
Davehc,
Re-Reading your insert in RED, that doesn't look like anything I've ever seen from a Windows (DOS) command prompt.
Where did that come from. I see "PowerShell" mentioned in RED. ???
Maybe the command didn't work because it was being run in the wrong command environment. eh?
It's a DOS command, not a PowerShell command. And must be run from a Windows (DOS) CMD prompt.
:cool:
 

davehc

Well-known member
Joined
Jun 24, 2021
Messages
627
Reaction score
151
Ran it in what is now called "Terminal" (Command Prompt). I think that is what you may mean by a command prompt? Also tried it under "Run", definitely the lowest level - no joy.
Definitely not Power shell. The line above (not posted) even recommends I use PowerShell, which I do not intend to do.

But don't spend too much time on it - I am happy with the method I use to remove unwanted junk.

I can see the commands are well posted over the web, some reporting errors, some working, so I'll give it a miss.
 
Last edited:

davehc

Well-known member
Joined
Jun 24, 2021
Messages
627
Reaction score
151
cant get away:cry: A little more in depth investigation.

For interest, not mentioned or a subject here. If you examine your files - Chrome sets up just as many "old" files as Edge.
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
I don't and probably Won't ever use Terminal. I saw it running in Task Manager and I shut it off.
As for Chrome, May it never darken my door!
I used to find that on customer's PC's and I'd ask them if they used it, and they would respond "What is it?". They didn't ask for it, use it or even know what it was. But there it was, trying to take over. So I'd delete it! Minus Chrome is cool!
It acted exactly like a Virus, sneaking into a person's PC, and trying to take over.

No Dave, terminal is not a CMD prompt. Sorry to burst your bubble. That's why the simple DOS command to delete a file did not work.
I've been working at a DOS prompt since around 1983 when I built my first IBM XT Clone PC, and installed MS DOS 2.0 on it.
Obviously, if Terminal can't accept the simplest of DOS commands, it wouldn't be of much use to me.
Of course I don't know for sure, but I'd assume that a Batch File would still run on your PC.

So by whatever method you choose, you're trying to clean up your PC, that's a good thing. You have my moral support.

Cheers Mate!
:cool:
 

davehc

Well-known member
Joined
Jun 24, 2021
Messages
627
Reaction score
151
fwiw, I do use the command prompt from time to time. I see no problem with it.
I would have thought running a bat file in the run box would be ok.

But, anyway, you got me going, and, further investigation, I discovered it was a waste of time deleting the 'old files made by the browsers - they are recreated when you restart.
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
Welcome to my world! That's the way browsers work. Every time they start, they just make more junk.
So before I do my weekly backup, I clean out all the junk, and then quickly shut down the PC, not giving any program time to make more junk.
My backup program runs from a bootable Flash Drive, totally bypassing Windows.

I'm so sorry! Apparently, I've been misleading, without ever meaning to.
But, I would NEVER run a batch file, or any such thing, from the RUN box, or a CMD (DOS) prompt.
Things I do run from the RUN box are, CMD, Regedit, Services.msc, and MSConfig.

From anyplace in your computer, or on a Flash Drive, etc. you can run a Batch file by simply Double Clicking on it, as you would to run any executable file. That compatibility power has been built into Windows since day one. So, Windows has always been Backward Compatible with DOS, using its built in Command Interpreter.

In the case of my Cleanup.bat program, I put it in a folder (Directory) that I create in the root directory of C:, then I right click on it and select, from the context menu, "Send to Desktop and Create a Shortcut".

OK, so now I have a shortcut on my desktop where I can run my batch file with just a double-click.
But I really want to run my batch file as the "Administrator". So, I right click on my new shortcut and in the menu that pops up, I click on "Properties" and then in the new menu I click on Advanced. In the little window that pops up I click on "Run as Administrator", OK that box, apply changes and close the window. NOW, when I click on the shortcut, my Cleanup batch file with run with Administrator privileges. For some commands in my batch file, it makes a difference.

When explaining the process this way, it sounds like a long and drawn out process, but when you've done it a few thousand times, like I have, it's a ten second process.

The one line, in my batch file, to dump the "Prefetch" folder, was so different, that I first had to first take Ownership of the folder, with the "Takeown" command, before I could delete the Prefetch files. So it took two lines of code, in the batch file, to do one little job. :rolleyes:

TAKEOWN /F "C:\Windows\Prefetch"
del /F /S /Q "C:\Windows\Prefetch\*.*"


But, when I'm going to run certain batch files from my Utils flash drive, for instance, I have to right click on the batch file, and from the context menu that pops up, I'll click on "Run as Administrator" or I won't get the required results from the batch file.
No, I didn't get that out of a book, only from the college of hard knocks. Or more accurately called "Experience".

When you leave the realm of User, and enter the realm of Programmer or Technician, things can get really interesting.
But, the rewards can be, Unending. If, heaven forbid, I live to be 100, I'll never fully understand all the in's and out's of Windows, but I'm working on it! :ROFLMAO:
I just keep asking questions, and getting answers, from people who know more than I do.
:cool:
 

davehc

Well-known member
Joined
Jun 24, 2021
Messages
627
Reaction score
151
Hmm??
Would not some of the proprietary cleaners , if customised correctly, do the job without all that detail? Daringly, just download Ccleaner, and, after customising, ran it. It did a fantastic job - removed 2Gbs of junk, in spit of my having cleaned two days ago.
But I am wary. It will now be removed and not used again.
By the way, is it worth the bother of removing, for example, those Cached files (very small ) If they are then recreated almost instantly?
Interesting discussion in the thread though. But I will leave you to it now. Be good
 

The Shadow 2023

Well-known member
Joined
Jan 22, 2023
Messages
370
Reaction score
60
I really don't want to discuss CCleaner. With all the hoopla about it, I tried it twice, over a significant period of time, and both times it disabled my Windows and I had to resort to restoring a Backup to get my OS back. Finis!

Once I'm finished with my own Cleanup Batch file, I can control exactly what is deleted and the registry and system files will not be touched. And I can install it and safely run it on any PC without 'Customizing' it for every PC. I can even send it over the internet, using a FTP program like Team Viewer, or even just email the code to someone, with the knowledge of how to turn it into a Batch File.
The options are endless.
And now, with just some slight modifications, I've adapted it to Windows 10, 8.1 and even Windows 7. And, although I've not tested it yet, I'll bet it will even work, at least to some extent on Windows XP. Because it gets rid of stuff that's common to every version of Windows since XP. Remember, it actually started out as "XPClenup.bat" years ago.

I've trimmed my program down to the very basic lines of code, and put it in my own Startup folder. It runs for just a few seconds every time I boot up my PC, and dumps yesterdays junk. No more junk buildup.
Go ahead, try that with CCleaner.

Y'all have a great day now, Y'hear?
: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

Unwanted popup 7

Top