user1625344 user1625344 - 9 months ago 82
AppleScript Question

Setting File Metadata with Applescript or Automator

I know how to set file keywords ( using a command line process that involves creating a plist, converting to binary and using xattr. It works but is painful. I'm hoping there is a better way.

Can anyone explain how to set file metadata using Apple's tools? Or point to websites that cover this?

All pointers appreciated.


Try to modify the code below to fit your needs:

set aFile to choose file
set a to quoted form of POSIX path of aFile

do shell script "xattr -w '(\"orange\\n6\",\"test\")' " & a

Happy keywording!