You can search files and folders on your Mac using the Spotlight search. Spotlight is good enough to find exact files based on your search query. However, you can also customize Spotlight search to show specific files you want in the results. In this article, let us explore how to customize Spotlight search on Mac to get more out of your searches.
1. Opening Spotlight Search with Keyboard
The first tip is to quickly open Spotlight search using keyboard shortcuts. Simply press “Command + Spacebar” to open Spotlight search using your keyboard.
2. View File Path
The problem with Spotlight search results is that by default you can only view and open the file or folder. It will not show the file path which you may need in many situations. For example, you may want to go to the destination folder especially when there are multiple files with the same file name you are searching for. In this case, after searching press “Command” key to show the file path on the status bar as shown below:
3. Open Destination Folder
From Spotlight search results, press “Command” key and double click on the file to open the containing folder in a Finder window.
4. Choosing Categories for Search
You can choose what folders are to be considered for showing in the search results. By ignoring the folders, you can decide not to show any files inside the folders in Spotlight search results.
- Click on the Apple Menu and go to “System Preferences…”.
- Select the Spotlight option.
- Go to “Search Results” tab and choose the categories to show in the results.
You can uncheck the category to hide the content from the search results. For example, unchecking “Applications” will not show any apps in the search results.
5. Changing Keyboard Shortcuts
As mentioned in the previous tip, you can quickly open Spotlight search by using “Command + Spacebar” shortcut. You can change this shortcut easily when you are on the preferences pop-up.
- Click on the “Keyboard Shortcuts…” button to view the default shortcuts to open Spotlight search and Finder search.
- Double click on the entry and assign new shortcut like “Shift + Command + Space” for opening Spotlight search.
6. Hiding Specific Folders from Search
Similar to filtering categories, you can also hide content inside specific folders from showing in the search results.
- First, open Finder and locate the folder you want to hide from the search results.
- Now go to Spotlight preferences section and navigate to “Privacy” tab.
- Drag the folder from Finder window and drop inside the Spotlight preferences box.
- Alternatively, you can also press the + button and add folders.
- In both methods, you can add multiple folders at once to hide from search. Similarly, you can select all and delete from the list.
This is a useful tip to hide unnecessary files showing in the Spotlight results by stacking all files into one folder and hide that folder.
7. Searching for Types of Files
Mac will categorize the Spotlight results automatically under images, documents, developer, etc. However, you can also filter the search result to show specific file types by using “kind” keyword in the search. The syntax is as below:
For example, to search only PDF files matching the keyword “WordPress”, you can use the following:
Below is the complete list of filters you can use to find specific file types using Spotlight search.
|kind:alias||Show aliases of files|
|kind:app||Show only applications|
|kind:audio||Filter MP3 and other audio files|
|kind: bookmark||Return bookmarked webpages from Safari browser|
|kind:contact||Show results from Contacts app|
|kind:documents||Show documents with the keyword|
|kind:document||Same as kind:documents|
|kind:email||Show results only from email messages|
|kind:event||Show events from Calendar app|
|kind:excel||Filter Microsoft Excel files|
|kind:exe||Show developer files|
|kind:folder||Show only folder|
|kind:font||Show installed fonts from your Mac|
|kind:gif||Filter GIF image files|
|kind:image||Filter all image files like PNG and JPEG.|
|kind:jpeg||Show only JPEG image files|
|kind:keynote||Filter Keynote files|
|kind:mail||Same as kind:email|
|kind:movies||Results show .mov, .avi or iTunes video files|
|kind:music||Same as kind:audio|
|kind:numbers||Filter Numbers files|
|kind:pages||Filter Pages documents|
|kind:pdf||Filter PDF files|
|kind:pic||Same as kind:image|
|kind:png||Show only PNG image files|
|kind:powerpoint||Filter Microsoft PowerPoint presentations|
|kind:preferences||Show tools from system preferences|
|kind:presentation||Returns presentation files like Keynote and PowerPoint|
|kind:quicktime||Filter only QuickTime videos|
|kind:spreadsheet||Returns spreadsheets like Excel and Number files|
|kind:tif||Filter only TIFF images in result|
|kind:word||Filter Microsoft Word document files|
8. Searching in Spotlight Finder
Besides independent Spotlight search, you can also use the Spotlight search inside the Finder window. Press, “Option + Command + Space” to open the Spotlight search inside Finder window. From here you can use all the above “kind:modifier” to filter the file type for any keyword.
9. Searching with Tag Color
Tags are an easy way to organize similar types of files. Mac uses colors as tags to group files into the same color. You can right click on any file to assign the tag color to it. You can simply use “tag:red” in Spotlight search to filter the files with red tag color. The available tag colors are red, orange, yellow, green, blue, purple, and gray.
10. Searching by Author
You can use the author keyword to filter results only from the particular author. This is useful especially when you have documents and emails from multiple authors on your Mac. For example, using “author:webnots” will show you all emails, messages and documents with the author name as webnots.
11. Restricting Dates in Spotlight Results
When you are using Mac for many years, it make sense to search files in certain date range. This will easily help to filter the file you want within the specified dates. You can use the “date:” keyword in the following manners to filter based on date:
- date: today
- date: yesterday
Spotlight will only return the files created or modified on the given date or range. You can also use the date: modifier with any keyword to filter files created or modified on the given date having specified keyword.
Ensure to use the correct date format as per your Mac. If you are in doubt, check the correct date format in “Date & Time” preferences section.
12. Using Search Operators in Spotlight
You can use Boolean operators like AND, OR and NOT in the Spotlight search. This is useful when you want to get the results for multiple keywords. Below are some of the useful ways of using these Boolean operators:
- ipad AND iphone AND mac
- android OR ios
- ipod OR ipad AND iphone
- ipad AND NOT iphone
Remember to use the operators in capital letter to avoid it is being treated as a keyword.
13. Excluding in Spotlight
You can use the minus sign to exclude certain items from the results. For example, searching kind:pdf -wordpress will show all PDF documents on your Mac that does not contain the keyword wordpress.
14. Using Mathematical Operations
Every one of us use Calculator for mathematical operations. However, you can also use Spotlight search to get quick math results. For example, you can type 2999+10399+200/34 to see the results like below.
You can click on the Calculator in the results to open the Calculator app to continue further calculations.
You may be using Spotlight search regularly to find files and folders on your Mac. However, knowing simple tricks can help to get things done quickly. We hope this article helped you to learn some new Spotlight search tricks to get most out of Spotlight search on your Mac.