10.4: Use Automator to batch add Spotlight comments

May 17, '05 10:16:00AM

Contributed by: Anonymous

Tiger only hintAfter installing 10.4, I noticed that every file now has a Spotlight Comments field attached to it (visible in the Get Info window), and was regretting that most of my existing files don't have comments. It's one thing to put comments on files as they are created, but to go back through and put information about which project or whatever files should be indexed with for the thousands of files already on my computer, wow, what a pain. On the other hand, like many people, related files are often in related locations. This means you can use Automator to batch-add comments to files in related locations. Just use the following sequence:

Ask for Finder Items
Get Folder Contents
Add Spotlight Comments to Finder Items

You will probably want to use the "Repeat for each subfolder found" option for Get Folder Contents. The only problem I have is I can't figure out how to get Automator to let me dynamically update the contents of the Spotlight comments I'm adding each time I run the workflow. Instead, I have to modify the appropriate field in the workflow before I run it each time.

Comments (11)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050508111303465