Dont continue matching subfolders

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Nr2arg
Posts: 1
Joined: Wed Sep 07, 2022 9:01 pm

Dont continue matching subfolders

Post by Nr2arg »

Suppose I'm searching for:

Code: Select all

es -w -i -sort path-ascending folder:\SoftwareDistribution
The results are:
C:\Windows\SoftwareDistribution
C:\Windows\SoftwareDistribution\DataStore
C:\Windows\SoftwareDistribution\Download
C:\Windows\SoftwareDistribution\EventCache.v2
C:\Windows\SoftwareDistribution\PostRebootEventCache.V2
C:\Windows\SoftwareDistribution\SLS
C:\Windows\SoftwareDistribution\DataStore\Logs
C:\Windows\SoftwareDistribution\Download\02fbd3861a0a12540c41a5dd9becb06d


I'm only interested in the first match:
C:\Windows\SoftwareDistribution


... the "root" of all the other subfolder

How can I stop matching the rest of the subfolders?

I've tried with several combinations of switches but can't get it right.
void
Developer
Posts: 16746
Joined: Fri Oct 16, 2009 11:31 pm

Re: Dont continue matching subfolders

Post by void »

Please try the following search:

Code: Select all

es -w -i -sort path-ascending parent:c:\windows\SoftwareDistribution
parent: = limit results to a specific folder. (with no subfolders)



If you want folders only, please include folder: in your search.
NotNull
Posts: 5461
Joined: Wed May 24, 2017 9:22 pm

Re: Dont continue matching subfolders

Post by NotNull »

Is this what you are looking for?

Code: Select all

es.exe   exact:"*\Windows\SoftwareDistribution"
Post Reply