Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

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
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

Your Answer


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.