My colleagues mark folders on mac server using their macs, and sometimes tell me i've marked those folders in green. I'm wondering if there's any mean to see what colours got assigned to what folders using PC. I'm connecting to the server using smb/ssh. Solution can be either windows or linux. Please not i'm not about to change those markings, neither looking for some robust solution, just quick hack.
1 Answer
The color labels are not stored in .DS_Store files. They are stored as Finder flags, which can be accessed using the com.apple.FinderInfo extended attributes.
$ touch /tmp/a
$ osascript -e 'tell app "Finder" to set label index of (POSIX file "/tmp/a" as alias) to item 1 of {2, 1, 3, 6, 4, 5, 7}'
$ xattr -p com.apple.FinderInfo /tmp/a | head -n1 | cut -c28-29
0C
$ osascript -e 'tell app "Finder" to label index of (POSIX file "/tmp/a" as alias)'
2
Red is C, orange is E, yellow is A, green is 4, blue is 8, magenta is 6, and gray is 2.
-
You're right, i thought DS_store saved both layout info as well as file label colors Oct 19, 2013 at 17:13