My most common search pattern is to search for files based on their name. When I try this in Spotlight (cmd-space) it rarely works. Is there a way to make Spotlight search for file names, and to place those results on top?

2 Answers 2


You can use this in your search to search for files with 'query' in their name: name:query

For more info about Spotlight commands, you can take a look at an excerpt of Mac OS X: The Missing Manual.


Spotlight needs you to search using the name: selector to restrict the results.

name:index.html in spotlight

I've also become a big fan of the Found app. It's currently free on the app store and lightning fast (seems faster than LaunchBar to me - and that's saying a lot as it's a speed demon). It's real claim to fame is that it also indexes DropBox, Gmail, Google Drive and Google Docs.

Back to spotlight if you don't want another app no matter how robust, slim and fast. Since the spotlight window defaults to showing everything - not just limited to searching the file name, I like to open the Finder search window and click on name. For me it's quicker than using the name:img trick since I get more hits than the spotlight window itself will show and end up hitting the show all results more often than not.

option +command +space and then you can type the name you wish to find followed by a click on the File Name button will only show the results with that string in the file name.

Search Window

  • Thanks, this helped me. Before I was able to search for filename.txt, but in Catalina that no longer works. It does work if I search for just filename without the extension. However, name:filename.txt still works. Jun 8, 2020 at 15:41
  • This still works for me - thanks for asking a new question @GeneParcellano
    – bmike
    Jun 8, 2020 at 16:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .