Folder that has file that matches content.

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Valik
Posts: 4
Joined: Tue Mar 19, 2024 10:44 am

Folder that has file that matches content.

Post by Valik »

I would like to be able to get a list of folders that contain a file containing certain text.
I don't have any idea on how to list the folders while searching for file content. All the folders are at the same depth while the files are deeper.

Currently I am trying to use something like this but it isn't getting any matches. I'm guessing the issue is the content search can't be at a different depth?

Code: Select all

"Z:\Files\Music\"   DEPTH:4   CHILD:*.log   CONTENT:"Exact Text"
"Z:\Files\Music\"   DEPTH:4   CHILD:*.log   DEPTH:5   CONTENT:"Exact Text"
Using this matches the files just fine but I need the folder they are in.

Code: Select all

"Z:\Files\Music\"   DEPTH:5   *.log   CONTENT:"Exact Text"
Any help would be appreciated.
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Folder that has file that matches content.

Post by void »

You'll have to do two passes:

1). Search for:

"Z:\Files\Music\" DEPTH:5 *.log CONTENT:"Exact Text"


2). From the File menu, click Export....
Change Save as type to EFU Everything File List.
Choose a filename and click Save.
---
From the File menu, click Open File List.
Select your EFU file list from above and click Open.
search for:

child:*.log


3). When you are finished with the results, close your file list from File -> Close file list.
Valik
Posts: 4
Joined: Tue Mar 19, 2024 10:44 am

Re: Folder that has file that matches content.

Post by Valik »

The saving & loading the file went fine but the final step of searching for child:*.log doesn't bring anything up.
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Folder that has file that matches content.

Post by void »

If you are using Everything 1.5, please try the following search before exporting:

"Z:\Files\Music\" <DEPTH:5 *.log CONTENT:"Exact Text"> | <DEPTH:4 CHILD:*.log>

-or-

Disable Tools -> Options -> Advanced -> filelist_hide_reconstructed_folders
Valik
Posts: 4
Joined: Tue Mar 19, 2024 10:44 am

Re: Folder that has file that matches content.

Post by Valik »

Yes using v1.5.
Changing the initial search seems to have fixed it but I also tried searching with content that shouldn't be in the file and it still found thousands of matches

Code: Select all

<DEPTH:5 *.log CONTENT:"Exact asd2f3a5wsdf"> | <DEPTH:4 CHILD:*.log>
void
Developer
Posts: 16748
Joined: Fri Oct 16, 2009 11:31 pm

Re: Folder that has file that matches content.

Post by void »

The first search will find all folders containing a log file.

After exporting and opening the file list, a search for:

child:*.log

should show only folders that contained a file that contained your content match.
Valik
Posts: 4
Joined: Tue Mar 19, 2024 10:44 am

Re: Folder that has file that matches content.

Post by Valik »

Thank you my good man. I'm sure I'll find this handy in future as well.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Folder that has file that matches content.

Post by NotNull »

And yet another way ... :

- Search for

Code: Select all

"Z:\Files\Music\"   DEPTH:5   *.log   CONTENT:"Exact Text"
- Select all resultlist entries (CTRL + A)
- Copy all entries to the clipboard (CTRL + C)
- Type the following in the (empty) search bar:

Code: Select all

child-filelist1:
- Press F2 to edit this filelist (or right-click => Edit filelist slot)
- Paste the results from the clipboard into the filelist
- Press the OK button

The result list will show the parents of the logfiles.
Post Reply