Tiger Secrets: Spotlight
Macworld sent in a team of specially trained spies to uncover Tiger’s deepest, darkest secrets. Our second installment deals with Spotlight. From lost files to smart folders, our experts show you how to get the most out of OS X 10.4 ’s potent search tool.
Reveal the file path in Spotlight
When you click on a search result in the Spotlight menu, the file opens in its default application. But what if you just want to see where a file is hiding, without actually opening it? Simply hover your mouse over a selection in the Spotlight menu, and a small box showing the file path will appear. To jump to the file in the Finder, select it in the Spotlight menu and press Command-return. Note that this shortcut works only in the Spotlight menu; if you have the Spotlight window open, control-click on the entry and select Reveal In Finder from the menu that appears. —Kirk McElhearn
Easily create additional Smart Folders
Tiger lets you save a Spotlight search query as a smart folder, which dynamically updates to include any files that match the search criteria. For example, you can create a smart folder that contains all the images you’ve opened in the past week (from the Finder, go to File: New Smart Folder, and set the first row of menus to Kind: Images and the second row to Last Opened: This Week; then click on the Save button).
If you later decide that you’d like another search that further restricts the results to only large images—those larger than 2MB, for example—use this shortcut: Rather than creating another smart folder from scratch, just open the already-created smart folder and click on the Edit button. Add your new search criterion (Size: Greater Than: 2MB), and then press and hold the option key—the Save button will change to Save As. You can then give your modified smart folder a new name so it won’t overwrite the original one. —Rob Griffiths
Find Smart Folders in a flash
Once you’ve created a bunch of smart folders, give them a special Spotlight comment so you can access them quickly from the Spotlight menu. In the Finder, control-click on the smart folder and choose Get Info from the contextual menu. In the resulting Info window, click on the arrow next to Spotlight Comments to reveal the blank Spotlight Comments field (see screenshot). Add your custom keywords here. I entered
SMSC, which stands for smart search. (You’ll get the most-accurate results if you choose keywords that aren’t associated with other files.)
The next time you want to quickly find that smart folder, press Command-spacebar to display the Spotlight menu, and then type your keyword. If the comment is unique, only your smart folders will show up in the search results. Double-click to open one directly from the Spotlight menu. (Want to add your keyword to many files at once? See “Easily add Spotlight comments” on the next page) —KM
Revert to the previous Find window
Do you dislike Tiger’s default Find window? You want to search for a file name, so you press Command-F, only to be faced with the Kind: Any and Last Opened: Any Date search fields, forcing you to manually add the Name: Contains setting. If you miss the old way of doing things, here’s how to turn back the clock.
First, create a new smart folder. Delete the second search setting (Last Opened: Any Date) by clicking on the minus sign (-) to its right. Then use the pull-down menus to change the Kind: Any setting to Name: Contains. In the file-name box, type something short that you know won’t appear elsewhere—for example, use three vertical bars (
|||).While you’re at it, set the window’s size and position. When you’re done, click on the Save button, name the smart folder whatever you like (you’ll rename it later), and save it to your desktop. Switch to the Finder and navigate to /System/ Library/CoreServices. Control-click on the Finder entry, and select Show Package Contents. In the new window that appears, go to /Contents/ Resources. Drag the file named default_smart.plist to your Documents folder, or to any location other than your desktop. This will serve as your backup file, in case you need to restore the original file later. Leaving the Resources window open, press Command-N to open a new Finder window, navigate to your desktop, and rename the new smart folder default_smart .plist. Click on the Use .plist option when the Finder asks whether you’re sure you want to make this change.
Finally, drag your new default_ smart.plist folder into the Resources folder. The Finder will ask for your admin password and will ask you to confirm that you want to overwrite the existing file. Once you’ve replaced the file, close the window.
To see your changes in action, restart the Finder. The easiest way to do this is to option-click on the Finder icon in the Dock and choose Relauch from the pop-up menu. Now when you press Command-F, you should see your newly customized Find window in all its glory; you’ll just have to replace the file-name field with the search text. —RG
Avoid Spotlight’s blind spot
Having trouble finding that sourdough-bread recipe that you downloaded from the Web or the ReadMe file that came with the program you just installed? Whether you download plain-text files or work with them in a text editor such as Bare Bones’ BBEdit or Apple’s TextEdit, you may have discovered one of Spotlight’s little quirks: it indexes some plain-text files only if they include the .txt extension (which may be hidden). To ensure that your plain-text files don’t get overlooked, make sure to save them with the .txt extension—just add it to the end of the file name. Conversely, if you don’t want your text files indexed—to save disk space, for example—omit the extension. —KM
Make TextEdit docs Spotlight-friendly
Some programs, including Microsoft Word and Excel, embed handy information (or metadata ) in files; this information aids Spotlight in its searches. For instance, Word and Excel automatically include the name of a file’s creator (as its author), and they guess at the document’s title. This information lets you search for files by creator, or by a title that isn’t part of the file name.
If you use TextEdit to create rich-text (RTF) documents, you can do the same. In TextEdit, select File: Show Properties, and enter an author, company, copyright, title, subject, keyword, or comment in the Document Properties window. If that sounds tedious, you can also define default Author, Company, and Copyright settings, which TextEdit will automatically apply to all your files. Select TextEdit: Preferences, and then enter the appropriate information. —KM
[ Contributing Editor Christopher Breen writes Macworld’s Mac 911 column. Senior Editor Rob Griffiths runs the Mac OS X Hints Web site. Contributing Editor Ted Landau is the author of Mac OS X Help Line: Tiger Edition (Peachpit Press, 2005). Kelly Lunsford is Macworld’s senior how-to editor. Kirk McElhearn is a coauthor of Mastering Mac OS X , fourth edition (Sybex, 2005). Dori Smith is the author of Dashboard Widgets of Mac OS X Tiger: Visual QuickStart Guide (Peachpit Press, 2005). ]