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

cincygolfgrrl

macrumors 6502
Original poster
Apr 2, 2012
346
227
Somewhere In Time
I attach tags to certain files, primarily invoices and such, which makes filing them where they belong from the beginning possible. When bill pay day rolls around I only need to select the appropriate tag from the side bar in Finder and all my current invoices appear. It's a great system for my workflow; I've used it for years.

Then recently I realized I should have a better back-up strategy. I purchased Carbon Copy Cloner which does daily back-ups of my SSD. Between Time Machine, the Clone, and an off-site back-up I'm confident my data is protected. But by adding the Clone I've introduced a problem into the system.

Now when I select the payables tag in Finder I have two copies of each invoice — one copy from the correct location on the SSD, and a second copy from the USB drive where the Clone is located. I've played with Automator thinking I could find a way to remove tags on the Clone, but the only actions there are for adding tags. I thought maybe I could just change the color of the tag in the Clone to something other than those I'm actively using. If that's possible, I'm not smart enough to figure it out.

Now, my issue is only inconvenient; it's not something that will break my workflow. But if anyone has an idea for removing tags once a file gets to the Clone drive I'd sure love to hear it. Thanks to all who take the time to read this.
 
Last edited:

w0lf

macrumors 65816
Feb 16, 2013
1,268
109
USA
Well I know how to remove tags via bash

Code:
xattr -d com.apple.metadata:_kMDItemUserTags /PATH/TO/FILE
xattr -d com.apple.FinderInfo /PATH/TO/FILE

You can also throw in a -r to recurse so

Code:
xattr -rd <attribute> /PATH/TO/FOLDER

So what I would do is set up an automator calendar alarm. Then using iCal have it run every day sometime after your backup.

The task would be something like the attached image.
 

Attachments

  • Screen Shot 2014-12-07 at 12.48.03 PM.png
    Screen Shot 2014-12-07 at 12.48.03 PM.png
    252.9 KB · Views: 81

cincygolfgrrl

macrumors 6502
Original poster
Apr 2, 2012
346
227
Somewhere In Time
Thank you

I've never messed with Shell Scripts, so I'll need to dig into these a little before activating. I really appreciate your effort. Thank you, again. I'll let you know how it all works.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.