I often use spotlight to locate documents quickly. The one annoying thing is that I often email documents to share them and spotlight will find the version of the document indexed in my mailbox attachments folders. Is there any way to selectively exclude certain directories while searching? I'm thinking something along the lines of:


I'd love a "not:message" operator or something.

I don't want to tell spotlight not to index any of my email--it's useful and sometimes I search for "kind:message". The only way around it I see would be to drag all of the "Attachments" subfolders under all of my .imapmbox folders (I'm using gmail imap). Anyone know of an easier way to do it?


1 Answer 1


Try "searchterm NOT kind:message"

  • Yes, that definitely does what I asked for. Unfortunately it doesn't solve my original problem. Emails are excluded, but attachments still show up since they are just documents in the filesystem. Seems like excluding each of the "Attachments" folders is the only way around it. Anyone see other options?
    – user3946
    Commented Feb 25, 2011 at 14:41

You must log in to answer this question.