Is there a way I can set the color label of a file to some color when in the Terminal?
I know that the following command lists some info about what the color currently is, but I can't figure out how to do something about it. Like change it.
mdls -name kMDItemFSLabel somefile.ext
The reason I would like to know is that I want to recursively mark all files in a folder of a certain type with a certain color label (in my case gray).
I know how to do the finding:
find . -name "*.ext"
And I know how I can run the command afterwards for each file using
-exec, but I need to know how to do the actual labeling…
I would like a solution that only involves commands built-in to Mac OS X. So preferably no 3rd party stuff, unless there is no other way.