Setting Finder comments and keywords
Setting Finder comments and keywords
- Subject: Setting Finder comments and keywords
- From: Chris Idou <email@hidden>
- Date: Thu, 10 Jul 2008 17:29:44 -0700 (PDT)
How does one programmatically change Finder comments and keywords?
I found this comment about MDItemSetAttribute...
http://www.cocoadev.com/index.pl?SpotlightAndTagging
which seems to say that if you use MDItemSetAttribute the changes will get blown away on a spotlight rebuild. I could understand attributes getting blown away that are derived from the file itself, but since Finder comments and keywords are not normally added by the spotlight indexer, it doesn't make much sense to me that rebuilding would blow them away. Still, if rebuilding blows away normal Finder comments I don't care. I just don't want what I do programmatically to be any "worse" than what would be done by the Finder itself.
The other suggestion I've seen is to send Apple events to the Finder to change these things. Since I'm writing a background application it seems terribly messy to be asking a foreground app to be doing stuff for me. Would it pop up the Finder window? That would be really ugly.
Any comments? Apple event code would be gratefully accepted if that is the only way.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden