Advanced searches in the Finder
The Spotlight menu is often the quickest way to start a search. And with the right keywords and Boolean operators, the Spotlight menu can dish up impressive results. But finding the files you need isn’t always as simple as typing a few words. For large or complex searches, open a Finder window and run your query from there. This will let you access a wider range of attributes and search criteria, let you combine multiple criteria to define your searches more precisely, and give you more options for sorting and viewing your results.
Start a Finder search
There are several ways to access Spotlight via the Finder. You can open a generic Finder window and use the search box at the top, press command-F to convert any open Finder window into a search window, or press command-option-spacebar to open a brand-new search window.
You can also access the Finder window after you’ve started a query in the Spotlight menu (useful if you’re having trouble narrowing down your results). Simply choose Show All at the top of the menu, and Spotlight will display the results of that search in a Finder window. (Note that Tiger’s dedicated Spotlight results window—which appeared when you chose Show All Results—is now a thing of the past.)
If the Finder displays your search results in Icon view, you’ll probably want to switch to List view to get a better look at your results. You can then select the column headers to sort by name, kind, or date. If you prefer a more graphical approach, switch to Leopard’s new Cover Flow view to look at previews of your files.
Hone your search
The Finder window’s search bar contains several options for tailoring your results. You can click on the File Name button (new in Leopard), which forces Spotlight to search only for file names rather than names and contents. Or you can click on This Mac to change the target of your search from the folder you were in when you started searching, to your entire Mac. If your computer is connected to other Macs, click on the Shared button to search networked machines as well. When your Mac is connected to other Leopard machines, Spotlight will search both file names and file contents. But when your computer is connected to a Mac running Tiger, Spotlight will search only file names.
On the right side of the Finder window’s search bar is a plus-sign button. Clicking on it brings up two pull-down menus; by default, the first is set to Kind, and the second is set to Any—but there are other options to choose from. To narrow down your results, start by selecting one of the criteria in the first menu, such as Created Date, Last Opened Date, or Name. Or choose Other to call up many more options, including Authors, Audio Bit Rate, Email Addresses, Recipients (people who received a certain file), Layers (names of Photoshop layers), and much more. Click on the check box next to an item if you want it to appear in the main pull-down menu for easy access in the future. As you select different options, the second menu changes dynamically so you can set the appropriate parameters (such as dates, numbers, and so on).
If you’re looking for a particular type of file, keep the first menu set to Kind, and use the Any menu to select from Images, Documents, Movies, and more. (It’s the same as using the kind: keyword, only you don’t need to remember the keywords or manually enter them.) You can access more file types by choosing Other from the Any menu and then entering a kind of file in the text field, such as
Combine multiple queries
Sometimes a search requires more than one set of criteria to summon the results you want. Finder-window searches let you specify as many parameters as you want. Say you want to search for all PDF documents you’ve created in the past week. To do this, leave the first menu set to Kind, and set the Any menu to PDF. Click on the plus sign in the search bar to add another search parameter. Set the first two pull-down menus to Created Date Is Within Last, enter
1 in the box, and select Weeks from the last menu. Spotlight will display all files you created or updated within the past month.
Although it’s not obvious, you can also use Boolean search terms to set up a Finder search—to exclude criteria or to create an OR search. Once you have one condition set up, you can add a Boolean term to your next condition by option-clicking on the plus sign. The plus sign will turn into an ellipsis (…), and you’ll get a new pull-down menu with options for Any (OR), All (AND), or None (NOT). (For more details, see Add conditions to Finder searches)
Save searches for later
What if you plan to search for recently created and updated Word files once a month, so you can back them up? There’s no reason to manually type the same commands every time. You can save yourself some work by preserving the searches you run regularly—as smart folders.
To save your current search as a smart folder, click on the Save button in the search bar, enter a name for the folder, and select a location to save it in. Enable the Add To Sidebar option if you want to make your smart folder a permanent fixture in that locale. Whenever you open this smart folder, Spotlight will run the search again and update the results with any new files that fit the criteria.
If you want to change your search, or add or remove criteria, simply open up the smart folder, click on the action button (the gear icon), and select Show Search Criteria. Note that in Leopard, several default smart folders appear in the Search For section of the Finder’s sidebar, including Today, All Documents, and All Images. You can use these folders as they are or modify them to suit your needs.
[Kirk McElhearn writes about Macs and much more. Visit his blog, Kirkville, for information about Macs, iPods, books, music, and more.]