O'Reilly Network    

 Published on The O'Reilly Network (http://www.oreillynet.com/)
 http://www.oreillynet.com/pub/wlg/7050

Folksonomise your files with Automator

by Giles Turnbull
May. 10, 2005

A little while back I wrote up some notes about getting things done on your Mac, notes that were largely inspired by the thoughts and writings of the 43Folders community, and its ad-hoc Organizer-in-chief, Merlin Mann.

One of the big buzzwords in personal (and digital) organization these days is 'folksonomy'; the process of adding keywords, or tags, to data in an effort to arrange it into loose 'clouds' of connectivity. The influence of web services like del.icio.us and Flickr has spread far.

If you want to use the same approach to your files and documents in Tiger, Automator offers the perfect solution.

My first effort with Automator was to create a workflow I named "@taggit". It's probably one of the simplest workflows you can imagine, consisting of just two actions: Get Selected Finder Items, followed by Add Spotlight Comments to Finder Items. This second action has the comments field left blank, and the Show Action When Run option checked.

I saved it as a workflow in my Scripts Folder, so it was in easy reach from the Scripts Menu.

When I run it with one or more files selected in the Finder, a little box appears asking me to type in some tags. Just like del.icio.us, I just separate them with spaces.

Adding Spotlight comments
The Spotlight Comments field in a Get Info inspector

Spotlight Comments are a new addition in Tiger. Invoke Get Info on any file, and you'll see a new text field at the top of the Info inspector, into which you can stick tag-like annotations. Spotlight sees these comments, so all files with the same tag will appear together in a Spotlight search window.

Better yet, you can create a Smart Folder using the criteria "Spotlight Comment" and "Contains" to keep all the "foo"-tagged files together in a always up-to-date "foo" folder.

Smart folder for ags
A Smart Folder for auto-grouping files tagged with 'flower'

If you wish, you could also save such a workflow as a Finder plug-in (hit Option+Command+S in Automator) which becomes available when you control-click (or right-click, two button mouse owners) on any Finder selection.

Now it's fair to say that the process of tagging lots of files is going to be time-consuming, but I'm wondering about the possibilities.

Consider my (oft-mentioned here) aging iBook. Despite the 640MB of RAM installed, it struggles to run iPhoto 5 at any kind of acceptable speed. So perhaps I could use Spotlight tagging and Smart Folders to organise my photos in the Finder. Editing tasks can be left in the capable hands of Graphic Converter.

Only one way to find out if this will work. I'm off to do some tagging.

Giles Turnbull is a freelance writer and editor. He has been writing on and about the Internet since 1997. He has a web site at http://gilest.org.

oreillynet.com Copyright © 2006 O'Reilly Media, Inc.