Remove Tags From Finder

Discussion in 'OS X Yosemite (10.10)' started by cincygolfgrrl, Dec 6, 2014.

  1. cincygolfgrrl, Dec 6, 2014
    Last edited: Dec 7, 2014

    cincygolfgrrl macrumors 6502

    cincygolfgrrl

    Joined:
    Apr 2, 2012
    Location:
    Somewhere In Time
    #1
    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.
     
  2. w0lf macrumors 65816

    w0lf

    Joined:
    Feb 16, 2013
    Location:
    USA
    #2
    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.
     

    Attached Files:

  3. cincygolfgrrl thread starter macrumors 6502

    cincygolfgrrl

    Joined:
    Apr 2, 2012
    Location:
    Somewhere In Time
    #3
    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.
     

Share This Page