Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When using the Spotlight search at the top right of a finder window, I often want the search to be non-recursive, i.e. only look at files in that specific directory, not any directories within it. Is this possible?

share|improve this question
add comment

3 Answers

As far as I know, unfortunately it's not possible to do this.

Strangely, I also set the 'Document Container' criteria within Spotlight and it wouldn't show any results at all.

This is extremely poor behaviour, I agree. You can give Apple feedback on OS X (from which you can post feedback on Spotlight) here.

share|improve this answer
add comment

The command-line interface to Spotlight, mdfind, has no such capability. (There is an -onlyin flag but empirically it's recursive.)

Since it's extremely unlikely that the Finder would have more capability than the command-line interface, I think it's safe to say that this is not possible. Sorry. That does sound like it would be a very useful feature.

share|improve this answer
add comment
up vote 0 down vote accepted

Not a solution for using the graphical interface, but i've started using the following in terminal to get the desired effect:

mdfind FOO | grep $PWD | grep -v ^$PWD/.*/.*$

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.