I am try to take a Finder selection and assign a specific content creator value to pdf files using applescript and xattr. While the script compiles fine, it doesn't actually modify the metadata item. If I run mdls -n kMDItemCreator test.pdf
I still get the old value of the kMDItemCreator. Any idea what I'm doing wrong?
-- Get the finder selection to pass to the repeat below
tell application "Finder"
set finderSelectionList to selection as alias list
end tell
-- Change the content creator of the selected files
repeat with theFile in finderSelectionList
tell application "Finder"
set a to quoted form of POSIX path of theFile
do shell script "xattr -w com.apple.metadata:kMDItemCreator 'some content creator'" & a
end tell
end repeat