Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Traverse

macrumors 604
Original poster
Mar 11, 2013
7,727
4,517
Here
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.
 

Attachments

  • Screen Shot 2014-08-25 at 11.20.48 PM.png
    Screen Shot 2014-08-25 at 11.20.48 PM.png
    177.7 KB · Views: 50
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.