• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Finder Comment
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder Comment


  • Subject: Re: Finder Comment
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 04 Dec 2009 08:57:13 -0600

Late yesterday, I was watching files being duplicated by my copyFile handler that uses ...

do shell script "cp -np " & sourcePath & space & targetPath

when I noticed that the file's label was being preserved. That's what the -p is for. The file's metadata contains the parameter kMDItemFSLabel whose value determines the file's color label. This value is preserved in the copy and the Finder displays its correct color. I don't have to read/restore the label before/after using the copyFile handler.

This prompts the question: "Why do I have to read/restore the value of kMDItemFinderComment ?"

If a file has a comment, then kMDItemFinderComment exists with the correct value, it IS preserved in the copy and the Finder should simply display it without having to read/restore.

I have also noticed that while a file without a comment should have

kMDItemFinderComment = ""

in the metadata, it actually has metadata that lacks the kMDItemFinderComment parameter. This parameter only appears when you write a comment (set comment of fileAlias to ...).

The files I am copying DO have a comment, but why is the Finder not displaying it unless I read/restore the comment? I smell a bug here.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Finder Comment
      • From: Yvan KOENIG <email@hidden>
References: 
 >Re: Finder Comment (From: Luther Fuller <email@hidden>)
 >Re: Finder Comment (From: Thomas Fischer <email@hidden>)

  • Prev by Date: Re: Recursion and Stack overflow
  • Next by Date: Re: Finder Comment
  • Previous by thread: Re: Finder Comment
  • Next by thread: Re: Finder Comment
  • Index(es):
    • Date
    • Thread