I used to use an automator code to make a copy of any file or folder and send it to my OneDrive folder while removing data such as tags so that I don't have duplicate tags.
Starting with 10.9.3 this script (which was part of an automator workflow) just stopped working:
for FILE in "$@";do
FILE_NAME="${FILE##*/}"
if [ -d "$FILE" ]; then
rsync -rut "$FILE"/ /tmp/"$FILE_NAME"
xattr -rc /tmp/"$FILE_NAME"
rsync -rut /tmp/"$FILE_NAME"/ ~/OneDrive/"$FILE_NAME"
rm -r /tmp/"$FILE_NAME"/
else
rsync -ut "$FILE" /tmp/"$FILE_NAME"
xattr -c /tmp/"$FILE_NAME"
rsync -ut /tmp/"$FILE_NAME" ~/OneDrive/"$FILE_NAME"
rm /tmp/"$FILE_NAME"
fi
done
Could someone write a new xattr portion to this command to remove tags or at least write a generic code to remove tags? It would help me so much. I used this every day.
Starting with 10.9.3 this script (which was part of an automator workflow) just stopped working:
for FILE in "$@";do
FILE_NAME="${FILE##*/}"
if [ -d "$FILE" ]; then
rsync -rut "$FILE"/ /tmp/"$FILE_NAME"
xattr -rc /tmp/"$FILE_NAME"
rsync -rut /tmp/"$FILE_NAME"/ ~/OneDrive/"$FILE_NAME"
rm -r /tmp/"$FILE_NAME"/
else
rsync -ut "$FILE" /tmp/"$FILE_NAME"
xattr -c /tmp/"$FILE_NAME"
rsync -ut /tmp/"$FILE_NAME" ~/OneDrive/"$FILE_NAME"
rm /tmp/"$FILE_NAME"
fi
done
Could someone write a new xattr portion to this command to remove tags or at least write a generic code to remove tags? It would help me so much. I used this every day.
Attachments
Last edited: