How to exclude the subfolders of search relsult (matched by path?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Jerry2024
Posts: 18
Joined: Sun Apr 28, 2024 5:16 am

How to exclude the subfolders of search relsult (matched by path?

Post by Jerry2024 »

Dear all, I need your help.

As the tittle says, I want to find a way to display search result without the subfolders. For example, I have one folder and it's path is C:\abc, and there are 10 folders and 5 files in "abc"folder;

1) I input the keywords "abc" , and find the result matched by "path", not file name;
2) I want to see only one search result "abc", not with 10 subfolders and 5 files (totally 16 search result)

I tried "depth" and "parent + x" coommand, but they could not solve my requirements.
1) because depth is for "absolute depth", and I need relative depth.
2) "parent + x" need input full path, but I want to input file name to match path.

Thanks a lot!
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to exclude the subfolders of search relsult (matched by path?

Post by void »

Does the following search help:

parent:C:\abc
Jerry2024
Posts: 18
Joined: Sun Apr 28, 2024 5:16 am

Re: How to exclude the subfolders of search relsult (matched by path?

Post by Jerry2024 »

Thanks for reply, but it seems you misunderstand me, C:\abc is only an example and I have too many folders like:
C:\abc
C:\abcd
C:\abcde
C:\abcdef
C:\abcdefg
...(too many, so I could not input all paths, ortherwise it's a huge job, and I even could not find out all folders contain "abc". )

I want to input keyword "abc" in search bar and use "Search - Match Path" funtion to see folders and files in abc / abcd / abcde ... briefly, but I do not need subfolders and files in subfolders (one subfolder may contain more than 1000 detailed files). It's much easier to find what I need in 50 results than 5000 results.

Any solution ways? Thanks a lot!
Last edited by Jerry2024 on Sun Apr 28, 2024 10:18 am, edited 1 time in total.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to exclude the subfolders of search relsult (matched by path?

Post by void »

What version of Everything are you using? (Help -> About)
Jerry2024
Posts: 18
Joined: Sun Apr 28, 2024 5:16 am

Re: How to exclude the subfolders of search relsult (matched by path?

Post by Jerry2024 »

It's 1.5 alpha, Version 1.5.0.1373a (x64)
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to exclude the subfolders of search relsult (matched by path?

Post by void »

There's currently no option to prevent subfolders from a path search.



Please try the following searches:

abc*\*

parentname:abc*



Search -> Match path will match the full path and name.

Please consider creating a filter:
  • From the Search menu, click Add to filters...
  • Change the Name to: Parent Name Start With
  • Change the Search to: startwith:parentname:$param:
Filters can be activated from the Search menu, Filter bar (View -> Filters), right clicking the status bar, filter macro or filter keyboard shortcut.
Jerry2024
Posts: 18
Joined: Sun Apr 28, 2024 5:16 am

Re: How to exclude the subfolders of search relsult (matched by path?

Post by Jerry2024 »

Thanks.

I tried the searches you provided, and here are results.

abc*\*: 0 items
parentname:abc*: 0 items

While when I tried to change keyword "abc" to the file name in "abc folders, the search result shows, so it seems I still did not explain clearly. The abc/abcd/abcde... I mentioned are folders' name(path name), not files' name, like the following:
Folder: C:\abc\,C:\abcd\...
Files:C:\abc\01.html, C:\abc\02.html,
Subfolders: C:\abc\a1\,C:\abc\a2\
Files in subfolders: C:\abc\a1\a01.txt,C:\abc\a1\a02.txt,.. C:\abc\a1\a100.txt,C:\abc\a2\001.png,C:\abc\a2\002.png...

So in short, my requirement is :
1) Search keyword of folder name "abc" to match path "C:\abc\" "C:\abcd\" "C:\abcde\"...
2) Show the folders (C:\abc\a1\,C:\abc\a2\)" and files (C:\abc\01.html, C:\abc\02.html )in "C:\abc\" "C:\abcd\" "C:\abcde\";
3) Do not show files & folders in thier subfolders( C:\abc\a1\a01.txt,C:\abc\a2\0001.png,C:\abcd\xxx.vsd,C:\abcde\mmmm\...).

Hope it's clear and thanks a lot.
Last edited by Jerry2024 on Mon Apr 29, 2024 1:45 am, edited 1 time in total.
void
Developer
Posts: 16773
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to exclude the subfolders of search relsult (matched by path?

Post by void »

The above should work.

Please make sure Regular expressions is unchecked under the Search menu.



Does the following find any results:

parentname:abc
Jerry2024
Posts: 18
Joined: Sun Apr 28, 2024 5:16 am

Re: How to exclude the subfolders of search relsult (matched by path?

Post by Jerry2024 »

It's successful, thanks so much!

I know why it doesn't work last time, it's becasuse my real folder name is like "mm_abc_01",“"mm_abc_02"”,so the command should be "parentname:*abc*", it works now.

Sincerelly suggest to add this as an option as "Match Path", and users may use "folder name" as tags of files to search and do not need to add tags repeatly.

Thanks again!
Post Reply