How to list only the topmost node containing a pattern?
How to list only the topmost node containing a pattern?
Assume I search a certain pattern (e.g. "aaa") in file+foldernames (pathes).
One folder with a (big) directory tree contains such a pattern.
Than means that ALL folders (and files) below are listed as well. Example:
D:\some\path\aaa-logs\2015\foo\bar\1111.log
D:\some\path\aaa-logs\2015\foo\bar\2222.log
D:\some\path\aaa-logs\2016\foo\bar\3333.log
D:\some\path\aaa-logs\2016\foo\bar\4444.log
D:\some\path\aaa-logs\2016\foo\bar\5555-special-aaa.log
Then ALL 5 files are listed + plus the subfolders 2015, 2015\foo\bar\ , 2016 and 2016\foo\bar. This is unnecessary.
In reality I do not have just 5 files as in the simplified sample above but hundreds or even thousands of files.
To reduce complexity and make it user friendly I need only the topmost node.
Furthermore this rule should only applied to the folder search. If a filename contains the pattern as well then it should be listed in results ignoring the folder rule.
Alltogether I would like to have the following results:
D:\some\path\aaa-logs\ (= due to folder rule all folders below in dirtree are omitted)
D:\some\path\aaa-logs\2016\foo\bar\5555-special-aaa.log (=due to filename priority rule it is listed)
Can I achieve this somehow in Everything or can this option be included in the next version?
Thank you
Peter
One folder with a (big) directory tree contains such a pattern.
Than means that ALL folders (and files) below are listed as well. Example:
D:\some\path\aaa-logs\2015\foo\bar\1111.log
D:\some\path\aaa-logs\2015\foo\bar\2222.log
D:\some\path\aaa-logs\2016\foo\bar\3333.log
D:\some\path\aaa-logs\2016\foo\bar\4444.log
D:\some\path\aaa-logs\2016\foo\bar\5555-special-aaa.log
Then ALL 5 files are listed + plus the subfolders 2015, 2015\foo\bar\ , 2016 and 2016\foo\bar. This is unnecessary.
In reality I do not have just 5 files as in the simplified sample above but hundreds or even thousands of files.
To reduce complexity and make it user friendly I need only the topmost node.
Furthermore this rule should only applied to the folder search. If a filename contains the pattern as well then it should be listed in results ignoring the folder rule.
Alltogether I would like to have the following results:
D:\some\path\aaa-logs\ (= due to folder rule all folders below in dirtree are omitted)
D:\some\path\aaa-logs\2016\foo\bar\5555-special-aaa.log (=due to filename priority rule it is listed)
Can I achieve this somehow in Everything or can this option be included in the next version?
Thank you
Peter
Re: How to list only the topmost node containing a pattern?
See the Functions:
Code: Select all
parent:<path> Search for files and folders in the specified path, excluding subfolders.
parents:<count> Search for files and folders with the specified number of parent folders.
childcount:<count> Search for folders that contain the specified number of subfolders and files.
childfilecount:<count> Search for folders that contain the specified number of files.
childfoldercount:<cnt> Search for folders that contain the specified number of subfolders.
Re: How to list only the topmost node containing a pattern?
Thank you, but these functions do not meet my requirements
Let me tell it in other words:
Example: Assume users search for "ccc" ("Match path" is enabled)
If then result line A is a subdirectory (or subdirectory+file) of line B then line A should be omitted/suppressed.
sample result:
D:\aaa\bbb\ccc\
D:\aaa\bbb\ccc\ddd\eee\fff\
D:\aaa\bbb\ccc\ddd\eee\fff\ggg.html
....second and third result line should be omitted.
This obvious requirement should be possible somehow.
Let me tell it in other words:
Example: Assume users search for "ccc" ("Match path" is enabled)
If then result line A is a subdirectory (or subdirectory+file) of line B then line A should be omitted/suppressed.
sample result:
D:\aaa\bbb\ccc\
D:\aaa\bbb\ccc\ddd\eee\fff\
D:\aaa\bbb\ccc\ddd\eee\fff\ggg.html
....second and third result line should be omitted.
This obvious requirement should be possible somehow.
-
- Posts: 4
- Joined: Sat Feb 27, 2016 3:17 pm
Re: How to list only the topmost node containing a pattern?
Try this in the search field:
Or for the \ccc\ example:
Apparently, match path needs to be disabled if you are trying to save a bookmark.
Cheers,
Mitch
Code: Select all
regex:^aaa
Code: Select all
regex:^ccc
Cheers,
Mitch
Re: How to list only the topmost node containing a pattern?
This does NOT work.
Result list is the same as the original without regex stuff
Result list is the same as the original without regex stuff
Re: How to list only the topmost node containing a pattern?
Does the following search help:
Code: Select all
ccc !*ccc*\*
-
- Posts: 4
- Joined: Sat Feb 27, 2016 3:17 pm
Re: How to list only the topmost node containing a pattern?
Hmmm. It worked for me when I turned off Match Path and turned on Folder.pstein wrote:This does NOT work.
Result list is the same as the original without regex stuff
In my case, after recreating your folder structure, regex:ccc or regex:^ccc only returned one level (along with all my real folders that matched)
My version of Everything is Version 1.3.4.686 (x86), if that matters.
Cheers,
Mitch
Re: How to list only the topmost node containing a pattern?
I am running the beta (1.4.0.713b (x86)) and in my case, with Match path: Enabled, I only get the leaf "ccc". I don't get "ccc\ddd", "ccc\ddd\eee" and so on.
HTH.
HTH.
-
- Posts: 4
- Joined: Sat Feb 27, 2016 3:17 pm
Re: How to list only the topmost node containing a pattern?
Wow. Interesting. Clearly, something else determines whether the leaf appears alone or not. @soaper, what is your complete search string?soaper wrote:I am running the beta (1.4.0.713b (x86)) and in my case, with Match path: Enabled, I only get the leaf "ccc". I don't get "ccc\ddd", "ccc\ddd\eee" and so on.
HTH.
Re: How to list only the topmost node containing a pattern?
Just "ccc".ParserMonster wrote:@soaper, what is your complete search string?
-
- Posts: 4
- Joined: Sat Feb 27, 2016 3:17 pm
Re: How to list only the topmost node containing a pattern?
Well, that only works for me if Match Path is disabled. {shrug}soaper wrote:Just "ccc".ParserMonster wrote:@soaper, what is your complete search string?