In OS X, Spotlight is an effective way to search your entire hard drive for a file or folder, email, or any other file. There are many other things Spotlight can do, and searching for files is just one of them. Spotlight is also capable of looking up dictionary definitions, launching apps, performing calculations, previewing audio, video, documents, and other files. This article will outline some of the benefits of using Spotlight and how to use Smart Folders, which allow you to search for a file even if you don’t know its name.
Basic searching
On a Mac, Spotlight can be used to search your hard drive for any file, folder, or email based on the search criteria being in the title or the body. So, if you have a document that you’ve lost, and you aren’t sure of the title, you can search using a word that you know is in the body of the document. This also works for emails.
For example, in the search result above, the Documents section displays Evernote,_Getting_Started_925.pages because the word “article” is in the body of the document.
Previewing files in Spotlight
When the search result is displayed, you can mouse over the file name and a preview of it will appear to the left.
This works for many types of files such as images, documents of all kinds, and more. For audio and video files, you can play or preview the file right in Spotlight, by moving your cursor over the file and clicking the play button.
Determining the location of the file
However, when you see the search result in Spotlight, it does not reveal the location of the file. To determine the location of the file in the search result move your cursor over the file name, and press and hold the Command key, or click “Show All in Finder” at the top. If you press and hold the Command key, first the file name, then the location of the file will be displayed.
If you click “Show All in Finder”, it opens a new Finder window that displays all the files that meet the search criteria. If you single click on a file, its location is dispayed in the Path Bar at the bottom. If you are not sure if you have located the correct file, press the spacebar to preview it.
Double-clicking on the folder name in the Path Bar to the left of the file name brings you directly to the folder the file is in.
The result of the search might include a large number of files. If that occurs, you may be able to find the file more easily by clicking the List View icon, and then Arrange icon and changing to sort by Date Modified or Name. Also, typing a more specific search in Spotlight may narrow the search result.
Moving documents with “Move To…”
Pages, Numbers, Keynote, and TextEdit have a handy “Move To…” option on the File menu. For documents like those, it make sense to simply open the document by clicking on it in the Spotlight search result, and the using File > “Move To…” and save the file to the location you want.
Searching by file extension
To search for files by file extension, type the “.” in the search. For example, if you are trying to locate all the Pages files on you your computer you would type “.pages” in your Spotlight search.
Tangentially, if you have ever burned DVDs on your Mac, you may be able to free up significant space on your hard drive by searching for “.dvdproj” in Spotlight. If you decide you no longer need a (typically large) DVD project file and delete it, it does not delete the movie from iMovie or Final Cut.
Launching apps
A simple but efficient way to take advantage of Spotlight is to use it to launch apps. To quickly launch an app that is not on your dock, just type the first few letters in Spotlight and press the Enter key.
Using Spotlight as a dictionary or calculator
If you type a word in Spotlight, one of the results is a dictionary definition of that word. Moving your cursor over in the search result displays a definition. Clicking on Dictionary opens the Dictionary app, where a thesaurus and Wikipedia view are also available using the buttons at the top.
Customizing Spotlight
To customize Spotlight, type anything in the search area and click Customize Spotlight at the bottom. You can exclude different sources from the search result by unchecking the corresponding checkboxes. This can be worthwhile if you use it frequently.
For example, I choose to exclude Mail & Messages, Contacts and Web History from Spotlight searches because I find those results distracting. If I want to search for data in any of those apps, I can simply open up the app and search within it.
Using Smart Folders
If you are looking for a file that you don’t the the name of, Smart Folders can be helpful. This can be especially true of image files where you don’t know the name because it was assigned by a camera. To search for files when you don’t know the name, open Finder and choose New Smart Folder from the File menu, or on the keyboard, use Command-Option-N. Click on the + sign on the top right and change “Any” to the kind of file you are looking for, such as “Image” or “Document.”
Then, click the + sign again, and and choose an additional criteria to search with such as Created Date. Type a number in the box to the right of “within last.” The example below would narrow your search result to all images on your computer that were created within the last 7 days, regardless of their name.
If you need to search for a file within a specific date range, you can do that using the After and Before operators, and setting the dates accordingly.
Remember, if you single click on a file, its location is revealed below in the Path Bar. If you are not sure if you have located the correct file single click on it, and then tap the spacebar to preview it.
If you close the Smart Folder a prompt will display asking if you want to save it. If you have located the file you were looking for, there is no need to save the Smart Folder. If you do save it, you will be prompted to name it, and add it to the Sidebar. If you do this, files that meet the criteria, even if you add them in the future, will be displayed in that Smart Folder. In other words, it becomes a saved search.
Everyone who owns a Mac should be aware of Spotlight and Smart Folders and their capabilities because they can make OS X more efficient and enjoyable. Please feel free to comment if you are using Spotlight in other ways, or want to add insight.
FTC: We use income earning auto affiliate links. More.
Spotlight is awesome! Today i was looking for specific invoices and it found them by the numeric value of subtotal!
Another useful shortcut is to click on a search result while keeping down cmd+option: directly open the folder of your file in the Finder.
I agree, Spotlight is a powerful tool everyone should know about. Your tip about cmd+option is seriously helpful. Thanks for the comment!
Some major changes coming to Spotlight in Yosemite too..
Definitely, I like change and was psyched the moment they demo’d the updates to it at WWDC
I hate Spotlight. FindFile and Sherlock were incredibly superior. I have given up on using Spotlight years ago.
How can I find a file by just the name of a file on a specific drive? Can it be done? SHOW ME!
Click on the drive in the Finder sidebar then use the Finder’s Search field. It asks if you want to use your search entry as the file name.
Hi, Not spotlight, but you can do this:
* CMD-N for a new finder window
* select/navigate to a drive
* type the file name you’re looking for into the search box
* down-arrow key once to select “Name matches…(what you typed)
* In the line below that it offers Search : This Mac // Directory or drive selected // Shared. Pick #2
List is displayed.
‘Luck!
“If you are looking for a file that you don’t the the name of”
Huh?
This happens sometimes with images. If the file they are looking for was the result of a scan or imported from a camera, the file name was assigned by the camera like IMG_001.jpg or scan.png. Especially if unwisely stored outside iPhoto or Aperture, the user may have no idea of the name of the file and have difficulty locating it.
It’s hopefully rare that someone would need use Smart Folders to locate a file, but it’s a good last resort.
Smart Folders give you the ability to find files by type and date created with a range, regardless of the name of the file. Unfortunately, people get into this situation, and want the result of a query like “show me all the images that have a created date between 6/1/12 and 6/30/12”, for example.
I hope that clarifies, let me know. Thanks for the comment.
How can I search only one folder to find a document or a word in a document? I tried the Mac directions for Spotlight but it defaults to “This Mac” every time showing me every time the word occurs in my entire Mac.
Yes, it defaults to “this Mac”, but if you start with a finder window open to the folder you care about, then search (top-right field in that folder window) , then switch from “This Mac” to “my_folder_name” it will search for filenames & text in that 1 folder.
Great point, and thanks for the comment.
I wanted to share this on Twitter. Unfortunately there’s no quick tweet button for this article..