How to list only the topmost node containing a pattern?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
pstein
Posts: 59
Joined: Thu Aug 07, 2014 6:18 pm

How to list only the topmost node containing a pattern?

Post by pstein »

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
therube
Posts: 4985
Joined: Thu Sep 03, 2009 6:48 pm

Re: How to list only the topmost node containing a pattern?

Post by therube »

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.
pstein
Posts: 59
Joined: Thu Aug 07, 2014 6:18 pm

Re: How to list only the topmost node containing a pattern?

Post by pstein »

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.
ParserMonster
Posts: 4
Joined: Sat Feb 27, 2016 3:17 pm

Re: How to list only the topmost node containing a pattern?

Post by ParserMonster »

Try this in the search field:

Code: Select all

regex:^aaa
Or for the \ccc\ example:

Code: Select all

regex:^ccc
Apparently, match path needs to be disabled if you are trying to save a bookmark.

Cheers,

Mitch
pstein
Posts: 59
Joined: Thu Aug 07, 2014 6:18 pm

Re: How to list only the topmost node containing a pattern?

Post by pstein »

This does NOT work.

Result list is the same as the original without regex stuff
void
Developer
Posts: 16841
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to list only the topmost node containing a pattern?

Post by void »

Does the following search help:

Code: Select all

ccc !*ccc*\*
ParserMonster
Posts: 4
Joined: Sat Feb 27, 2016 3:17 pm

Re: How to list only the topmost node containing a pattern?

Post by ParserMonster »

pstein wrote:This does NOT work.

Result list is the same as the original without regex stuff
Hmmm. It worked for me when I turned off Match Path and turned on Folder.

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
soaper
Posts: 55
Joined: Sun Nov 08, 2015 9:34 am

Re: How to list only the topmost node containing a pattern?

Post by soaper »

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.
ParserMonster
Posts: 4
Joined: Sat Feb 27, 2016 3:17 pm

Re: How to list only the topmost node containing a pattern?

Post by ParserMonster »

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.
Wow. Interesting. Clearly, something else determines whether the leaf appears alone or not. @soaper, what is your complete search string?
soaper
Posts: 55
Joined: Sun Nov 08, 2015 9:34 am

Re: How to list only the topmost node containing a pattern?

Post by soaper »

ParserMonster wrote:@soaper, what is your complete search string?
Just "ccc".
ParserMonster
Posts: 4
Joined: Sat Feb 27, 2016 3:17 pm

Re: How to list only the topmost node containing a pattern?

Post by ParserMonster »

soaper wrote:
ParserMonster wrote:@soaper, what is your complete search string?
Just "ccc".
Well, that only works for me if Match Path is disabled. {shrug}
Post Reply