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?

link|improve this question
feedback

1 Answer

up vote 1 down vote accepted

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

Quoth the documentation:

kMDItemPath

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.

Link

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.

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

Your Answer

 
or
required, but never shown

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