Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

I want to exclude specific folders from a spotlight query. I do NOT want to exclude them from indexing in general -- I just want to exclude them from my current query. I know how to add exclusion clauses to my queries (hold down alt/option and then click the ellipses and then click 'none'), however I don't know the field I'm supposed to choose. Is it 'Location,' 'URL,' 'Name'? I even tried using the mdls command on an example file in the folder I'm trying to exclude but I still don't know the name of the field that holds the file's path.

share|improve this question

You can use URL and e.g. file:///Users/danielbeck/* to exclude all items in my home directory, using * as wildcard operator.

Based on the description, I think Location refers to physical location e.g. in Photo metadata.

Name is just the file name itself, not the path.

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.