How to search for folders (not) containing files with specifics?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
2530
Posts: 14
Joined: Mon Jun 27, 2022 4:49 pm

How to search for folders (not) containing files with specifics?

Post by 2530 »

Could you perhaps give an example for such a search, if such a search is possible to begin with - perhaps some regex trick?

a) Obviously, if the file specifics are substrings in the file names, both positive and negative folder searches may be quite simple, albeit without then grouping several hits for the same folder into just just mention of that folder for positive searches, so a search for all folders containing files with substring "something" will list the same folder more than once if more than one file in that folder contains the searched-for substring, SQL (which would resolve the problem) not being applicable here; negative searches ("find folders who do not contain files containing the substring in their file names") would be even easier.

b) But I currently can't imagine a way to find folders (on some drive e.g., or subfolder of some parent folder - that's the easy part of course, both in a) and b)) that contain, or which do not contain, files with certain attributes, e.g. hidden, system, or in combination; I hope I'm overlooking a way to construct such a search... or is it not possible currently?

For a positive search ("show folders which contain at least one system file" e.g.), I obviously could search for such files, then export the result set ("full paths") into a file or into clipboard, then run a script against that export set, deleting the folder name doubles / multiples (and the file name parts), i.e. do a "search in search", i.e. an external "search" within the search results;

but for a negative search ("show folders with no system file in them" e.g.), I would have to search for all files (in that drive / folder (sub-) hierarchy), then export the result in csv format, including the (system and/or other) attribute(s), then, by script, delete all hit rows, then consolidate the rows that are left (consolidate = as before: delete folder doubles / multiples, delete the file parts of the paths).

Thus, I know a way to get the desired results, but obviously, that's a lot of "fuss", so I hope there might be a better way, within EV and/or ES?

Thank you very much!
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: How to search for folders (not) containing files with specifics?

Post by NotNull »

This will be much easier in Everything 1.5 instead of 1.4:
2530 wrote: Sat Oct 14, 2023 7:03 pm find folders who do not contain files containing the substring in their file names

Code: Select all

!child:"substring"
The quotes are optional if the substring does not contain spaces.
( ! = NOT )



2530 wrote: Sat Oct 14, 2023 7:03 pm But I currently can't imagine a way to find folders [...] that contain, or which do not contain, files with certain attributes, e.g. hidden, system, or in combination

Code: Select all

"C:\starting folder\"   !child-file-attrib:R   !child-file-attrib:SH



2530 wrote: Sat Oct 14, 2023 7:03 pm For a positive search ("show folders which contain at least one system file" e.g.),

Code: Select all

"C:\starting folder\"   child-file-attrib:S


All these serch functions are described in detail here.
2530
Posts: 14
Joined: Mon Jun 27, 2022 4:49 pm

Re: How to search for folders (not) containing files with specifics?

Post by 2530 »

This is fantastic, thank you so much!

I admit I had not made the switch in-between, for general wariness about alphas-and-betas, but I make the switch today, and thinking it over, EV/ES is about file search / filtering, not about file changes, so that even in the "worst case", nothing catastrophic could occur, so I should have made the switch months ago indeed!

Sorry for having bothered you with something you have already implemented, Everything is really better than even sliced bread, it's an incredible tool and the ultimate reason to stay with "Windows"!

Thank you so much again!!!
Post Reply