Page 1 of 1
Folder that has file that matches content.
Posted: Tue Mar 19, 2024 11:20 am
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.
Re: Folder that has file that matches content.
Posted: Tue Mar 19, 2024 11:25 am
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.
Re: Folder that has file that matches content.
Posted: Tue Mar 19, 2024 11:43 am
by Valik
The saving & loading the file went fine but the final step of searching for child:*.log doesn't bring anything up.
Re: Folder that has file that matches content.
Posted: Tue Mar 19, 2024 11:55 am
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
Re: Folder that has file that matches content.
Posted: Tue Mar 19, 2024 12:21 pm
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>
Re: Folder that has file that matches content.
Posted: Tue Mar 19, 2024 11:01 pm
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.
Re: Folder that has file that matches content.
Posted: Wed Mar 20, 2024 11:56 am
by Valik
Thank you my good man. I'm sure I'll find this handy in future as well.
Re: Folder that has file that matches content.
Posted: Wed Mar 20, 2024 6:30 pm
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:
- 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.