On every other operating system except MacOS, when you bring up an Open File dialog, you can type (for example) *.txt or even *recipe*.txt to narrow down the list shown on the screen.

On MacOS, there's just a predefined list of filename extensions that you can choose from, but I don't see anywhere to type a file match pattern myself. I want to filter by the whole filename, not just the extension. How do I enable this very basic feature that I take for granted on both Windows and Linux?

5 Answers 5


You have Spotlight available from every file-picker dialog.

enter image description here

You can search by name or extension/file type, either in the currently open directory or the entire machine.

enter image description here

Sidebar hidden to save unnecessary extraneous detail

If you know the name rather than the filetype of the document you are looking for, then, same as in any Finder folder, you can start to type the name & the selection will jump to the first match for that string.

eg typing t,e,s will find the first match on test.txt, but you can't use this to find a file type .xml etc as it only searches from the beginning of the name.

enter image description here

  • I have several files in /tmp with "category" in the name, and this approach isn't matching any of them. Spotlight defaults to searching "This Mac", which shows all kinds of irrelevant crap, and if I click "tmp", I see no results, even though the files in question are right there. Apr 12, 2017 at 22:30
  • 2
    Spotlight doesn't search 'hidden' folders.
    – Tetsujin
    Apr 13, 2017 at 5:59
  • I'm looking to search "the current folder", whatever that may be. Spotlight is useless. Apr 14, 2017 at 2:37
  • 1
    I'm sorry the answer you got wasn't the one you wished you could have. That doesn't make it wrong. We're here to answer your questions; your frustration is all your own.
    – Tetsujin
    Apr 19, 2017 at 6:29
  • 1
    I refer you to my previous comment. Please do not take your frustration out on me, I was trying to help. I shall try not to make the mistake of doing that again.
    – Tetsujin
    Apr 19, 2017 at 18:40

Following the example screens provided by Tetsujin, immediately prior to entering text in search area, it would be possible to use the Finder menu to Go : Go to Folder... and then enter /tmp in the dialogue box shown. Thereafter entering text in the Search field should find the files of interest.

enter image description here

  • There is no Finder menu if the Open dialog was created by another app. You might as well have suggested using the open command from the shell. Apr 19, 2017 at 0:12
  • @ThrowawayAccount3Million use cmd-shift-g, that pulls up the 'Go to Folder' dialog.
    – Harv
    Apr 22, 2017 at 1:01

Here is an example using a standard Open dialog, specifying text files which are really just any non-binary files, and then doing a contains search so you're not limited to prefixes.

enter image description here enter image description here


The above doesn't work in /tmp because Spotlight doesn't index hidden folders. So just use grep at the command line.

enter image description here

  • That doesn't work in /tmp/. As I already said, Spotlight is useless. Apr 19, 2017 at 18:35
  • 1
    That's because Spotlight doesn't search in hidden folders. I refer you back to my answer & comments.
    – Tetsujin
    Apr 19, 2017 at 18:44
  • I can confirm this doesn't work in /tmp, I was surprised, Tetsujin's explanation sounds reasonable. I would argue if you know what /tmp is you should know what grep is. Apr 20, 2017 at 8:28
  • I do know what grep is, but if I already have a GUI app open, I want to be able to easily open my file from within it, like I can under Linux. That a Unix-like server OS is easier and more pleasant to use than the Mac is not a point in Apple's favor. Apr 20, 2017 at 17:45
  • @ThrowawayAccount3Million it isn't Linux, it's not going to behave exactly the same as Linux does. I understand the frustration but you'll need to accept this as a limitation; what you want is simply not built-in to the OS the way you want it to be.
    – Harv
    Apr 22, 2017 at 1:00

You can access any folder from any file dialog box by pressing cmd-shift-g and entering the directory path. This is the same as "Go to folder..." in the Finder. Then enter your search parameters in the search box. Open file dialog box from within Safari

  • Yes, this is how I got to /tmp in the first place. Thanks for pointing out the obvious. If you search for passwd while you're poking around in /etc you'll discover that the search tool can't find it because it's deliberately crippled. Apr 29, 2017 at 6:59

The answer is that only partial functionality is available via Spotlight. If the file you're looking for is anywhere in the Unix-style directories such as /tmp, /etc, /usr, /var, etc, Apple's Open dialog is just broken and you simply cannot filter your view of the files there except by a predetermined set of file extensions.

  • This 'rant' is kind of like complaining that you can't edit source code with Microsoft Word. Each app has it's intended purpose. Mac provides a better experience by not giving users a 'kitchen sink' of menu options with every app like Windows. Apr 20, 2017 at 8:35
  • The Mac experience has always been terrible, but at least nowadays they can run Emacs, bash, and other Unix tools. My employer wouldn't be a Mac shop otherwise. Apr 20, 2017 at 17:43
  • @ThrowawayAccount3Million it's not broken. It filters those directories out because the audience are not people who want to see what's in those folders. Many things on the macOS are filtered out, obfuscated or otherwise hidden in order to reduce clutter and make it better for the ideal audience. That audience is clearly not you, however, coming from your background there are ways you can make the macOS work well for you. You may just need to be less rigid about it. I say that not in a condescending way but from my own personal experience.
    – Harv
    Apr 22, 2017 at 1:03
  • @demianturner It's more like complaining that my car doesn't have a "reverse" gear because the engineers took into account the fact that people are more interested in driving forward. That's literally how Macs are designed. I don't even have the luxury of an escape key unless I plug in an external keyboard. Other manufacturer's laptops not only have escape, but they also have Home, End, PageUp, and PageDown, and unlike the case in macOS, they actually work. Apr 29, 2017 at 7:02
  • @ThrowawayAccount3Million I'm not kidding. The people who buy Macs generally appreciate them. I'll certified across platforms, I've used Linux for 15+ years, MS for the same and Macs for even longer, and my daily machine is a Mac because it does certain things in a way I appreciate much more than the other platforms do. Sorry you've had bad experiences but that doesn't mean the product is bad, it just means it doesn't meet your expectations.
    – Harv
    Apr 29, 2017 at 21:27

You must log in to answer this question.

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