unwanted nested label colors

Posted:
in macOS edited January 2014
Is there a way to remove label colors via the command line...



I have a collection of images that have been labeled with various colors in deeply nested folder and was thinking if I could do recursive command via the command line I could simply remove all the label colors.



tia

Comments

  • Reply 1 of 7
    dobbydobby Posts: 794member
    Labels are metadata and kept in the resource fork.

    You can't currently access the metadata from the command line (unless you write a program to do so).



    Perhaps there is a bit of software on the web that can do this.



    Dobby.
  • Reply 2 of 7
    kickahakickaha Posts: 8,760member
    Actually, you can to some degree.



    cat file.foo/rsrc will get you the resource fork. It's an invisible directory attached to each file with such a fork.



    rm file.foo/rsrc will blast away the resource fork completely and indiscriminately. This may or may not be what you want.
  • Reply 3 of 7
    dobbydobby Posts: 794member
    Quote:

    Originally posted by Kickaha

    Actually, you can to some degree.



    cat file.foo/rsrc will get you the resource fork. It's an invisible directory attached to each file with such a fork.



    rm file.foo/rsrc will blast away the resource fork completely and indiscriminately. This may or may not be what you want.




    I only have separate resource files on AFS emulators.

    (.rsrc, ._filename, .AppleDouble...)

    From the OS X terminal prompt I can't see the resource fork as per above. Do I need a different shell?



    Dobby.
  • Reply 4 of 7
    rara Posts: 623member
    How about you do this:



    Open up the folder that's at the root of all the other folders and images. Press apple-2 to switch to list view. Press apple-a to select everything, then apple-right arrow to open every folder. Keep pressing apple-a followed by apple-right arrow until every folder is open. Then press apple-a one more time, right-click on something, and remove all the labels at once.
  • Reply 5 of 7
    kickahakickaha Posts: 8,760member
    Quote:

    Originally posted by dobby

    I only have separate resource files on AFS emulators.

    (.rsrc, ._filename, .AppleDouble...)

    From the OS X terminal prompt I can't see the resource fork as per above. Do I need a different shell?



    Dobby.




    Nope. Like I said, they're invisible. You won't *ever* see them, but you can access them as I outlined above.
  • Reply 6 of 7
    dobbydobby Posts: 794member
    I can't do a cat or rm on the /rsrc. It must be there as you said as I get an Operation not premitted on the rm and the cat doesn't give anything (but it doesn't fail!).

    Excellent tidbit of info.

    Dobby
  • Reply 7 of 7
    scottscott Posts: 7,431member
    You may want to use rmdir



    >man rmdir
Sign In or Register to comment.