Applescript-xattr
Hey, i have used the xattr commnad in applescript to list the tag of the file example.rtf (as below)
xattr -px com.apple.metadata:_kMDItemUserTags "example.rtf" | xxd -r -p - - | plutil -convert json -o - - | sed 's/[][]//g' | tr ',' '\n'
and the result is
"Ricette\n5"
What i need now is to SET the TAG of another file (es. pink.rtf) like the previous result "Ricette".
Can someone help me?
MacBook Pro, OS X Mavericks (10.9), MBP,iMac,iphone,iBook G4