MacMost Now 490: Tagging Files With Spotlight Comments

You can add tags to any file in Mac OS X using the Spotlight Comments field. You can then search for files based on those tags. This can help you organize your files when a simple folder system isn't enough.

Video Transcript
Hi, this is Gary with MacMost Now. On today's episode, let's learn about spotlight comments. So sometimes organizing files by folders just doesn't work. For instance, you my have a document that belongs in multiple folders. So a better way to do it is to tag files in the same way you might tag photos or music. Now, the way to do this is to use something called Spotlight Comments that allows you to add tags to files and then you can search by those tags later. So here I have a folder filled with documents. Now if I want to tag a document, what I would do is first select it, and then I would choose File and then Get Info - or simply Command + I. This will bring up the info window for that document and you can see here that I got Spotlight Comments at the top. You may need to open it to see it. Now I can add tags. Let me just call them something simple, lets just use names. So I can add a tag like Jones and I can separate it with, ah, commas, smith. and I can close that one and go to the next one, Command + I, and add a tag there and continue down. Now you would do this ideally while creating the documents, not after the fact. A shortcut, by the way, is to do Command + Option + I by holding down the Option - and see here it's Command+ Option + I - it should show the inspector. Looks just like the info window but as I select the different files, it remains open and I can quickly view the Spotlight Comments and edit them without having to close this window here. Now when I go to search I can actually type one of these tags and it's going to search the contents for that word. It's going to come up with a lot of things here that I don't necessarily want. So, instead of searching for the complete contents, I'm going to add a criteria here and I'm going to select Other, and from the list I'm going to look for Comment and select actually Spotlight comment, not Comment, and then I'm going to set the matches and you can see it actually those two files there that I tagged. There's jones. If I look at smith, it'll find the files that I tagged as smith. So what you may want to do here is set it up so that comment - Spotlight comment - is in the menu. So now when I actually go to search I can quickly select Spotlight comment instead of having to find it under Other. So if I want to find a document that matches TWO tags, I can simply go and put both of them in there like that - as in separate lines. There, its going to show me the one file that matches both of those. Now if I want to find documents where any of those tags are found, I can hold the Option key down when adding a criteria, and you can that see it now gives me Any of the following are true, All, or None so I can add multiple criteria here and it's going to give me all the documents with both jones and smith as tags. I also can determine which folder to look in to for instance I have MyDocs selected right now so if I start searching for something here, I can see that I have the ability here to set it for search the entire Mac or just MyDocs which will give me only the files in there. So here now if I just do a regular search without even specifying that it is a Spotlight comment, it's only going to look at those documents so it will give me basically the same results since all I have in MyDocs are tagged documents. You can use Spotlight Comments on any file types, so you can use it for documents, for photos, videos - anything you like. Hope you like this - look at Spotlight Comments and find it useful. Till next time, this is Gary with MacMost Now.

Comments: 12 Responses to “MacMost Now 490: Tagging Files With Spotlight Comments”

    1/16/11 @ 10:37 am

    Very handy!

    3/4/11 @ 10:15 am

    Great tip, nice summary!

    7/31/11 @ 3:01 pm

    Is there a way to see all the tags that I have used throughout the year?, there are some that I do not longer remember.

    9/15/11 @ 9:24 am

    Hi, I’m having trouble getting multiple Spotlight Comments to be seen by some Smart Folders. I notice that you use a comma with no space. I’ve tried this (with and without a space). I built a little Automator app to add Spotlight Comments, which creates a carriage return for separate Spotlight Comments (i.e., each is on a separate line). There is no comma here.

    Do you have any suggestions as to what I’m getting wrong?

    Thank you!

      9/15/11 @ 9:30 am

      Not offhand. Just keep experimenting. Maybe it is taking a while for Spotlight to index these changes. Or, maybe adding the comments via Automator isn’t triggering Spotlight to re-index those files. What happens when you add them the same way manually?

        9/22/11 @ 3:29 am

        Thanks Gary – I’ve tried three manual ways: comma separated”,”; comma and space separated”, “; and carriage return. Both comma methods fail (i.e, files don’t appear in all the folders they should) and when I try manually separate with a carriage return…well, it doesn’t allow you to (the whole line gets highlighted but nothing happens; i.e., with Automated Smart Comments, I get carriage returned separation — but that’s the only time you see it!).

        I’ll let you know if my experimenting works!

    Joe B
    11/10/11 @ 5:51 pm

    Hi. Great video! I’m new to your sight and look forward to viewing more.
    Question: Do you know if spotlight comments sometimes disappear for no apparent reason? Not sure, but I may have had some disappear on me. Trying to test this by creating comments and checking at later date. Appreciate your help very much!

      11/10/11 @ 5:53 pm

      I can’t think of any reason why they would disappear, no.

    Eddie W
    11/19/11 @ 1:13 pm

    @Joe B: I’ve had comments disappear on me. I’ve watched it happen on the main screen where the system shows my disks in Finder. I previously used the comments field to show the total size of each drive. The comments invariably disappeared after a random number of days/weeks, so I’ve come to distrust the comment fields altogether.

    11/29/12 @ 1:54 pm

    is the comma necessary between tags?

      11/29/12 @ 2:17 pm

      Well, you need something in between them so they don’t all run into each other. Try spaces and see if that works just as well.

Comments Closed.