Search folders at specific/specifiable level in a tree

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
kazzybash
Posts: 24
Joined: Mon Mar 02, 2020 9:55 pm

Search folders at specific/specifiable level in a tree

Post by kazzybash » Fri Jan 28, 2022 12:29 pm

hi,

was searching for an Everything-function connected to this one here: viewtopic.php?f=5&t=9740

I am looking for a way to display folders exclusively on a specified depth of level (not first level per se). Say I have this drive E:\ with the deepest nesting at level five, then I want to be able to see folders at, say, level 4 ONLY and not at any other level.

I found out this is possible with powershell: Get-ChildItem E:\*\*\* -Directory

whereby the number of \* in the command determine the level depth.

Powershell is another 'tool' and this command produces an as yet unworkable list. I would like this function in a gui, preferably in Everything :lol: .

Any suggestions as to how to produce such an advanced search?

Kind regards, kazzy

NotNull
Posts: 3648
Joined: Wed May 24, 2017 9:22 pm

Re: Search folders at specific/specifiable level in a tree

Post by NotNull » Fri Jan 28, 2022 1:19 pm

You mean the depth: function or it's alias parents: ?
Everything Search Syntax wrote:depth:<count>
parents:<count> Search for files and folders with the specified folder depth.

kazzybash
Posts: 24
Joined: Mon Mar 02, 2020 9:55 pm

Re: Search folders at specific/specifiable level in a tree

Post by kazzybash » Fri Jan 28, 2022 4:23 pm

hi NotNull,

thanks for your kind reply. I am not sure if I understand you correctly.

I was not referring to any function I knew of, but to something I wish to accomplish with a search and management tool (preferably Everything :P ). Total Commander has a function to search for folders up to a specific and specifiable depth in the hierarchy (say 'search no deeper than level 3'), but does thereby not exclude higher levels.

I tried the syntax from your reply 'depth:' and 'parents:' but they did not yield anything other than the top folder levels (being my harddisks).

Kind regards, kazzy

NotNull
Posts: 3648
Joined: Wed May 24, 2017 9:22 pm

Re: Search folders at specific/specifiable level in a tree

Post by NotNull » Fri Jan 28, 2022 5:28 pm

depth:2 will find "C:\Windows\notepad.exe"
depth:>2 will find "C:\Windows\System32\cmd.exe"
depth:>=2 will find both

You can also use depth:<3. etc.

You can type these in the Everything search bar.


Please take a look at the Everything Search Syntax

raccoon
Posts: 683
Joined: Thu Oct 18, 2018 1:24 am

Re: Search folders at specific/specifiable level in a tree

Post by raccoon » Fri Jan 28, 2022 5:56 pm

another example of using depth to control the level of folder contents to search for. in this case, only folders of depth 3 to depth 4.

e:\music\ depth:3..4

e:\ <- depth 1
e:\music\ <- depth 2
e:\music\videos\ <- depth 3
e:\music\videos\mtv\ <- depth 4

kazzybash
Posts: 24
Joined: Mon Mar 02, 2020 9:55 pm

Re: Search folders at specific/specifiable level in a tree

Post by kazzybash » Mon Jan 31, 2022 9:59 am

hi both, thanks a lot for your reactions. What I am looking for is 'folder only' , I am (in this case) not interested in folder-contents. What I am looking for is a refinement in folder management which, as of yet, I have not been able to find in any tool.

So I am looking for a way to display folders (not their contents) exclusively on a specified depth of level. Say I have this drive E:\ with the deepest nesting at level five, then I want to be able to see folders at, say, level 4 ONLY and not at any other level.

Any suggestions as to how to accomplish such a search?

Thanks and kind regards, kazzy

void
David Carpenter (Developer)
Posts: 9378
Joined: Fri Oct 16, 2009 11:31 pm

Re: Search folders at specific/specifiable level in a tree

Post by void » Mon Jan 31, 2022 10:09 am

Please try the following search:

e: folder: depth:4

e: = limit results to your E: drive only
folder: = match folders only.
depth:4 = match files/folders with a depth of 4. (4 parents)

raccoon
Posts: 683
Joined: Thu Oct 18, 2018 1:24 am

Re: Search folders at specific/specifiable level in a tree

Post by raccoon » Mon Jan 31, 2022 10:12 am

Slap on the folder: filter to any search query to display only folders.

e:\music\ depth:3..4 folder:
or
e:\music\ folder: depth:3..4
or
depth:3..4 folder: e:\music\

edit: @void types faster than me.

kazzybash
Posts: 24
Joined: Mon Mar 02, 2020 9:55 pm

Re: Search folders at specific/specifiable level in a tree

Post by kazzybash » Mon Jan 31, 2022 12:13 pm

wow guys, this does the trick. Exactly what I needed, I mean, also in vivo. This works for the task I intended. Thanks a lot!!

Post Reply