Why Everything is fast

General discussion related to "Everything".
Post Reply
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Why Everything is fast

Post by ChrisGreaves »

Fixing Corrupted Files

A hard disk event has caused me to lose the content of a great many files.
918 objects at last count, including files of several different types.
I make a nightly backup, and each week backup that backup to a cumulative weekly backup.
On the weekly backup are copies of the files before they were corrupted to a zero-byte size.

I will write some Word/VBA code to locate a copy of the file on my weekly backup, but first I need a full list of all the corrupted files.
In this example I define “corrupted” as “having a reported file size of zero bytes”. I have already loaded several such files and found that indeed they contain no visible data.

As I did for the audio play list exercise, I ask Everything to produce a list of all zero-length files (“size:0”).
The simple filter “size:0: returns both files AND folders, but I have no plans to deal with zero-length folders, only zero-length files.

Adding the file: filter reduces the results to include only files. “size:0 file:” does the trick for me.
FilterObjects
size:0918
size:0 file:222
size:0 file: .LOG 35
I notice thirty-five log-files and decide to focus on those files for a minute or two. Adding the four-character string “.LOG” to the filter does the trick.
FixingCorruptedFiles_04.png
FixingCorruptedFiles_04.png (62.22 KiB) Viewed 2132 times
The image above shows part of the search window with 35 objects.
Note that my filter collected both “log” and “log2” extents.
Note that the filter is not case-sensitive (see “case:”)
Only three log-files were newer than six months. I check those three log-files and they are of no value to me.

Confidently I select all 35 log-files and delete them. That’s 35 anomalies out of the way.

I repeat my log-file search but looking for other major groups of size=0 files (dat, dmp, lock, txt)

After this quick exercise I am down to 79 zero-length files - out of an original set of 918 zero-length files.
I sort the list into Path sequence and after looking at the path and name of each file, decide that I will risk it and delete all the remaining zero-length files.
There is, therefore, no need for me to dash off and test then run a small VBA program.
Everything saves me time not just by its speed, but by saving me the time it takes to write logic to solve a problem.


Cheers, Chris
raccoon
Posts: 1017
Joined: Thu Oct 18, 2018 1:24 am

Re: Why Everything is fast

Post by raccoon »

I would suggest not worrying about system logs. They may be zeroed out by Windows on purpose, or perhaps you are loading Everything without the necessary permissions to access these files (don't have the Everything system service loaded, or As Administrator, maybe.)

Exclude the log files from your search results to locate meaningful files that you know for fact should not be zeroed out, such as "Documents\All I want for Christmas.docx" and "Downloads\Mrs Claus wearing Christmas negligee.jpg"

If you're tempted to delete files from your system folders, I recommend adding those system folders to your Excludes to prevent accidentally making Windows become unstable.
harryray2
Posts: 1104
Joined: Sat Oct 15, 2016 9:56 am

Re: Why Everything is fast

Post by harryray2 »

Regarding system logs...There is a nifty little programme from Nirsoft which one can enable/disable selected Windows system logs, it's called Eventlogchannelview.

One can also limit the size of a log with this.
ChrisGreaves
Posts: 684
Joined: Wed Jan 05, 2022 9:29 pm

Re: Why Everything is fast

Post by ChrisGreaves »

raccoon wrote: Mon Dec 26, 2022 5:19 pm I would suggest not worrying about system logs.
Thanks Raccoon. The point I was trying to make was not about log files (or TMP files, or BAK files, or ...), but that five minutes with Everything saved me perhaps five hours of messing around in a programming language.
And that when we say that "Everything is fast", we should recognize the time that it saves us in identifying the problem and implementing a solution, not just the extremely clever design of Everything when it executes.
Cheers, Chris

P.S. I should add that a preliminary pass (restoring zero-length files to non-zero length from the weekly backup) reduced the number of zero-length files from to 919,101 to 6,518. This was not a small job! C
Post Reply