Converts Finder color labels to icons so that they can be "persisted" and restored from bucket storage archives.
OS X comes bundled with a rather sophisticated Robotic Process Automation (RPA) utility called Automator. Custom scripts can be invoked and chained as follows:
- An Automator service that can be triggered from any application
- A Bash script that processes a single folder, the heart of operation. Copies a
pngfile inside and sets the folder icon
- An AppleScript that sets Finder color labels
Note all the support files are manually bundled inside the workflow package inside a folder called
Resources. The name resembles normal Mac applications, but Automator does not actually create this folder for workflows—which means it won't get overwritten either when the script is modified!
How to Install
Copy the workflow into
How to Prepare Folders for Cloud Storage
- Tag folders with Finder colors (green, orange, etc.)
- Invoke the service
- Right click the top level folder in Finder
Servicesfrom the drop down
Convert Finder Labels to Icons
- A little gear will spin the menu bar as the workflow executes
- The script writes a file
orange.icon.pngetc. into all folders with labels, and sets the icon of the folder to that new icon (to indicate it did work)
All these folders can then be archived in bucket storage.
How to Restore Finder Labels from Cloud Storage
- Download the files and folders from cloud storage. The original icon and label are lost, but the
- Invoke the service again on the parent folder from Finder's context menu.
- The script recursively sets the icon of each folder based on the
pngfile inside and also sets the Finder label again!