filter hidden and system files (instead of excluding from index)

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
rdsignr
Posts: 8
Joined: Tue Jan 21, 2020 12:14 pm

filter hidden and system files (instead of excluding from index)

Post by rdsignr »

It seems currently the only way to exclude hidden files and/or system files, is to exclude them from the index.
It seems that this setting cannot be bookmarked and changing it means rebuilding the index.

Is there a way to filter these files from search results instead?
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: filter hidden and system files (instead of excluding from index)

Post by ovg »

Try search:

Code: Select all

!attrib:s !attrib:h
оr create filter, eg https://yadi.sk/i/oP2OBS72_uMAKA

You should enable index attributes via Tools->Options->Indexes: Index Attributes
rdsignr
Posts: 8
Joined: Tue Jan 21, 2020 12:14 pm

Re: filter hidden and system files (instead of excluding from index)

Post by rdsignr »

Thank you for the suggestion and sorry for my late reply.

I tested it and realized that I need something different from what I initially asked for:

The option under Tools>Options>Indexes>Exlude "Exclude hidden files and folders" excludes all files contained within hidden folders, even if the files themselves don't have a hidden attribute set. The search !attrib:h on the other hand does list files contained inside of hidden folders if the files themselves don't have the hidden attribute.

Is there a way to reproduce the exclude from index option, but by using filter syntax?
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: filter hidden and system files (instead of excluding from index)

Post by NotNull »

Something like this? (not tested):

Code: Select all

!<folder: attrib:s|attrib:h>
rdsignr
Posts: 8
Joined: Tue Jan 21, 2020 12:14 pm

Re: filter hidden and system files (instead of excluding from index)

Post by rdsignr »

Yes, thanks, getting closer.

I added the following in order to also exclude files and folders that are hidden/system but not located inside of hidden or system folders.
!<folder: attrib:s|attrib:h> !attrib:s !attrib:h

However, the result is still much larger than when turning on the index exclusion options. I'll do some more testing to find where the differences are.
Last edited by rdsignr on Tue Feb 04, 2020 7:43 pm, edited 1 time in total.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: filter hidden and system files (instead of excluding from index)

Post by NotNull »

Just tested this. The "!<folder: attrib:s|attrib:h>" didn't work as I expected.

It did exclude (for example) the hidden folder c:\users\NotNull\appdata, but not all files and folders within.
In my case that explains the largest part of the difference between the two strategies. That and C:\Programdata ..

Will think about it a little longer as I can't come up with a solution at the moment.
rdsignr
Posts: 8
Joined: Tue Jan 21, 2020 12:14 pm

Re: filter hidden and system files (instead of excluding from index)

Post by rdsignr »

Thanks, I appreciate your help.
For what it's worth
!<folder: attrib:s> !<folder: attrib:h>
seems to be equivalent to
!<folder: attrib:s|attrib:h>
as expected.
FYI on my machine, I get the following results:
No exclusion, no filter: 778k objects found
No exclusion + filter
!<folder: attrib:s|attrib:h> !attrib:h !attrib:s
: 773k objects found (-0.6%)
Hidden and system files excluded, no filter: 551k objects found (-41%)
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: filter hidden and system files (instead of excluding from index)

Post by NotNull »

Out of curiousity:
does adding this to the search query reduce the difference much?

Code: Select all

 !shell:"common appdata"   !shell:appdata 
(Still not a solution ...)
rdsignr
Posts: 8
Joined: Tue Jan 21, 2020 12:14 pm

Re: filter hidden and system files (instead of excluding from index)

Post by rdsignr »

It filters around 7% of objects, so much better already but nowhere near the 41% of the index exclusions.
Post Reply