Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

1 Answer 1

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.

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

Your Answer

 
discard

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.