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,728
4,517
Here
I've been using this workflow for a while now that allowed me to right-click on any file or folder and send a copy to OneDrive and replace existing files, but it was set up to strip the files of their meta data like tags so that I don't get duplicated in Finder Tags.

I have a new system with 10.9.4 and this code is no longer working. Now it makes a copy and puts it in my OneDrive folder, but it doesn't take away the metadata so I have multiples of the same file in each Finder Tag. Can someone who knows coding spot the problem?

Thanks! I use this workflow daily.


Here is the code straight from Automator:

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
 

Attachments

  • Screen Shot 2014-07-02 at 7.21.58 PM.png
    Screen Shot 2014-07-02 at 7.21.58 PM.png
    76.4 KB · Views: 53
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.