Page 1 of 1

How to search only one directory deep?

Posted: Sat Dec 27, 2014 5:52 am
by Specular
So I read the docs and found this section:
Limit the search to a single folder:

Code: Select all

c:\windows\ !c:\windows\*\*
I'd like to be able to search only one directory deep. This is the code I'm currently using for an 'Apps' search filter:

Code: Select all

<"C:\Portable Apps\"|"C:\Program Files\"|"C:\Program Files (x86)\"> .exe
However after trying to exclude sub directories deeper than one deep it failed. Tried !"C:\Program Files\*\*" but it filters out everything.

How can I create a filter that only searches one directory deep?

Re: How to search only one directory deep?

Posted: Sat Dec 27, 2014 7:49 am
by therube
Limit the search to a single folder:

Code: Select all

c:\windows\ !c:\windows\*\*
Note that the ! is an ! (exclamation, aka a NOT) not a | ("bar", aka OR).

I'd like to be able to search only one directory deep. This is the code I'm currently using for an 'Apps' search filter:

Code: Select all

<"C:\Portable Apps\"|"C:\Program Files\"|"C:\Program Files (x86)\"> .exe
Try

Code: Select all

<"C:\Portable Apps\"|"C:\Program Files\"|"C:\Program Files (x86)\">   parents:3   .exe
(:3 is probably what you're after [in this case] rather then :2)

Re: How to search only one directory deep?

Posted: Sat Dec 27, 2014 12:31 pm
by Specular
Ah, the parents: parameter is just what I'm looking for! Cheers :)