Subscribe / Unsubscribe Enewsletters | Login | Register

Pencil Banner

How to create good queries in Yosemite's Spotlight

Kirk McElhearn | May 20, 2015
By mastering a few simple tricks you can use OS X's Spotlight to locate exactly what you need.

To see what sort of metadata a file is storing, select it in the Finder, press Command-I to open the Get Info window, and click on the triangle next to More Info. However, you're not limited to the metadata you see here. You can add your own keywords to any file. In the Info window, click on the triangle next to Comments. In the text field that appears, enter any keywords that might help you in future searches, such as the project the file is related to or the last name of a person you associate with it.

For example, by adding the comment HouseProject to any files having to do with the purchase and remodeling of your new home, you'll be able to find all those files with one easy search. It's a good idea to use "HouseProject" rather than "House Project" because that way Spotlight only searches for the single, uncommon word, instead of finding every file with the words "house" and "project."

If you use this trick often, you may want to create an Automator workflow that lets you apply the same comment to multiple files at once. To do this:

  • Launch Automator. Create a new document and select Service for the type.
  • Select Files & Folders from the Library column.
  • Drag Set Spotlight Comments For Finder Items from the Actions list to the workflow pane.
  • Click on Options, and enable the Show This Action When Workflow Runs option.
  • Press Command-S to save the file, and choose to save it as an application.

To put your new Automator workflow to use, simply drag any files on its icon. A dialog box will appear, allowing you to add your comments to dozens of files at once.

Take advantage of keywords

Even when you know what you're looking for, you may get an overwhelming number of search results. To help limit searches to certain file types or time periods, use one of the many useful keywords that Spotlight understands. Place the appropriate keyword and a colon in front of your search term (but don't insert a space before the colon). Here how to take advantage of Spotlight's keywords.

Search for File Names: If you know the name of the file you're looking for, you can limit your search to file names by using the name:keyword. For example, when you type name:machine, Spotlight will find only files that contain the word "machine" in their names (though your search results may also turn up bookmarks, iCal events, and other items). As with regular search queries, you'll need to use quotation marks to identify phrases, such as, name:"time machine".

Find an Author: If you can't remember the contents of a file but you know the name of the person who created it, you can try using the author:keyword. To look for a document written by your boss, Herbert, enter author:herbert in the search field. There's just one catch: Spotlight will find only files produced by programs that save this attribute, such as Mail, iChat, Word, Excel, Pages, Numbers, and a few others.


Previous Page  1  2  3  4  Next Page 

Sign up for CIO Asia eNewsletters.