As I was fed-up to read info for my files to remove saved attachment link (file I received as attachment in an email), I added a function to one of my software to do it.
My Xojo line code is:
CdeShell.Execute "xattr -d com.apple.metadata:kMDLabel_rm6yhtlxtile5o7f6kgch4s3fm " + MyFolderItem.ShellPath
I used xattred to know what is the xattr to remove. It works for almost all my files.
And just now my software didn’t work for a file, I read its xattr and it is:
com.apple.metadata:kMDLabel_6h22tmh5kw3ti3x57hvtqy4nze
Question 1: How can I know how many xattr exist for saved attachment link?
Question 2: I’m not good in Shell, how can I remove the two xattr in one command line?
Something like:
CdeShell.Execute "xattr -d com.apple.metadata:kMDLabel_rm6yhtlxtile5o7f6kgch4s3fm com.apple.metadata:kMDLabel_6h22tmh5kw3ti3x57hvtqy4nze " + MyFolderItem.ShellPath
or
CdeShell.Execute "xattr -d com.apple.metadata:kMDLabel_* " + MyFolderItem.ShellPath
Thank you very much for your help.
2 posts - 2 participants