Super User is a question and answer site for computer enthusiasts and power users. 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

I would like to create custom backup sets for Mozy which exclude certain directories. For example, I would like to backup my Itunes folder, but exclude all podcasts. I have created a backup set which searches in /Users/me/Music and used this query

kMDItemPath == "*Podcasts*"wc

to exclude all matching files. However, nothing matches. Queries which use the kMDItemFSName spotlight attribute work fine, but any query using kMDItemPath doesn't seem to work at all. What am I doing wrong?

share|improve this question
up vote 1 down vote accepted

Answered here in StackOverflow (I'm quoting kperryua):

Quoth the documentation:


Complete path to the file. This value of this attribute can be retrieved, but can't be used in a query or to sort search results.


That means that the attribute kMDItemPath can only be used with a MDItem or NSMetadataItem to retrieve the path for an item already found. You cannot use it with an MDQuery or an NSMetadataQuery within the query predicate you specify to find files.

share|improve this answer
Bummer! But thanks for the answer. – ubiyubix Jun 26 '10 at 15:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .