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:
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