Spotlight Tagging With Meta
One of the neat features Apple introduced in Tiger is the Spotlight comment (sometimes referred to as the Finder comment). In a nutshell, a Spotlight comment is a searchable piece of text you associate with a file. For example, you could add the comment "picture of sunset over Golden Gate Bridge" to an image file. This accomplishes two things: it describes the file in way that makes sense to you, and it makes it easier to search for this file later. This is a very useful feature on its own, but when you add Meta to the equation you get something even more powerful: Spotlight tagging.
What Is Tagging?
You may already be familiar with the concept of tagging from such on-line services as flikr and del.icio.us, but if not don't fret - its a very simple concept. A tag is basically a keyword you create that classifies a piece of data. By creating and adding tags to data, you create a flexible and custom organizational scheme. Using our picture of the Golden Gate Bridge as an example, some possible tags are "pictures", "San Francisco", "vacation", "bridges", "Golden Gate", and "sunset". Once you have your data classified using tags, searching and organizing your files is a snap.
Not convinced that tagging can make your life easier? Maybe another example would help. Lets say you want to organize the files on your machine into two basic categories: your personal files and your work files. One way to approach this without tagging is to store your personal files in one directory, and the work files in a different directory. This approach will get you pretty far, but there are some drawbacks. If you already have your files organized into particular hierarchy, it may be difficult to rearrange them into the 'personal' and 'work' categories. And what do you do if you have files that belong in both categories? It seems you are in a bit of a pickle.
Tagging solves these problems because it allows you to categorize files without having to move them - no pickles in sight. All you have to do is assign the 'personal' tag to your personal files, and likewise assign the 'work' tag to your work files. Any files that belong to both categories simply get both tags assigned to them.
Tagging With Meta
Now that we know what tagging is and how it is useful, let's talk about how you can start tagging your files with Spotlight tagging. Spotlight tagging is a method that uses Meta along with the existing Spotlight comment feature to add tags to your data. You may be thinking to yourself: "I already have Spotlight, why do I need Meta to accomplish Spotlight tagging?"
Excellent question. As it turns out, Spotlight and the Finder are missing some pretty important features that make tagging difficult, if not impossible. First, the Finder won't let you edit the comment of multiple files are once. Using the above example, if you wanted to apply the "work" tag to a whole bunch of files, you are out of luck. Second, there is no mechanism to append keywords to an existing Spotlight comment, and adding tags using the edit feature becomes awkward at best. And last but not least, Spotlight doesn't let you search on comments directly. So if you wanted to search for all files tagged with "work", the best you can do with Spotlight is search for "work". This will find all your files tagged with "work", but it will also find all files with work anywhere in the content, which isn't all that useful in this situation. Thankfully Meta is here to the rescue.
Now we get to the good part: using Meta to assign tags to files. The first thing you need to do is execute a search with Meta and get some results, then you can add a tag to of all or some of the results. Simply select the results you want to tag and choose 'Append Spotlight comment' from the Action menu. Alternatively, you could right-click while selecting the results to bring up the contextual menu, and from there select 'Append Spotlight comment'. Either way, you will be presented with a text box where you can enter your tag. Using the example above, you could enter the comment 'personal' to your personal files and 'work' to your work-related files. If you have results that belong to both categories you can simply enter 'work personal' or 'personal work' as the tag, or you can append the "work" and "personal" tags separately. For more information about the 'Append Spotlight Comment' feature of Meta, check out: Setting Spotlight Comments
Once you have some files tagged, you can use Meta to locate and organize your files. For example, to find all your work-related files you could use this query in Meta:
comment = *work*
That query will find all files with 'work' anywhere in the Spotlight comment, and only in the Spotlight comment. You can then save this query as a Metafolder named 'Work', which you can use later to instantly find your files. Want to locate files that are tagged with either "work" or "personal" tags? Just run this query:
comment = *work* or comment = *personal*
How about finding only files that are tagged with both "work" and "personal" tags? Easy:
comment = *work* and comment = *personal*
These example queries are just the tip of the iceberg. For more information on building your own queries with Meta, take a look at: Searching For Items
Spotlight tagging with Meta is an extremely easy, flexible, and effective organizational tool. We hope this article has given you the desire to give Spotlight tagging a try on your machine. It may just make you a better person.