Finder fixes and how-tos
Finder's search field has a scope, and one setting decides whether it starts on the whole Mac or on the folder you have open. Change it once, or switch scope for a single search.
In Finder, open Finder > Settings (or press ⌘,), go to the Advanced tab, and find When performing a search. It has three choices:
Choose Search the Current Folder. From then on, typing in the search field of a Finder window searches the folder that window shows, including the folders inside it, instead of the whole Mac.
Those three labels match Finder's own resource strings on macOS Sequoia (15.6), and Apple's Finder settings guide describes the same choice for later versions: the entire Mac, the folder that's open, or the scope you used last time. It is a Finder setting, so you won't find it in System Settings.
You don't have to touch the setting to search one folder once. Open the folder in Finder, click the search field in the toolbar and type your word. A bar appears under the toolbar with This Mac and the folder's name. Click the folder's name to search only that folder, or click This Mac to go wide again.
The scope you click is kept for that search. What the next search starts on depends on the Advanced setting above:
| Advanced setting | The next search starts on |
|---|---|
| Search This Mac | The whole Mac, every time |
| Search the Current Folder | The folder open in that window |
| Use the Previous Search Scope | Whatever you clicked last |
If you keep flipping the scope by hand, Use the Previous Search Scope saves clicks. If you mostly work inside project folders, Search the Current Folder is the better default.
Check the scope bar first. If it still says This Mac is selected, the result list is for the whole Mac, which is why a long list of unrelated files appears. If the right folder is selected and nothing shows, check the spelling, then try a shorter part of the name.
A search limited to a folder is still a Spotlight search underneath. It uses Spotlight's index, so it leaves out whatever Spotlight and Finder searches leave out: much of ~/Library, the insides of app packages, and drives Spotlight has not indexed. If a file is definitely in the folder and still doesn't appear, the index may be missing it. Our post on Spotlight versus Finder search explains how the two relate, and Finder search tips covers the criteria you can add to a search.
The Spotlight menu (the magnifying glass in the menu bar, or ⌘Space) is different. Up to macOS Sequoia it has no way to search only one folder: it searches everything it indexes. From macOS Tahoe 26, Apple's guide describes filtering Spotlight by where a file is stored: type a location such as iCloud Drive, press Tab, then type the name. Apple's example is iCloud Drive, so for an ordinary folder, search from Finder or use Terminal.
mdfind, the command-line face of Spotlight, takes an -onlyin option that limits the search to a directory. Its manual page says: "Limit the scope of the search to the directory specified."
mdfind -onlyin ~/Documents "invoice"
That matches the word in any metadata Spotlight holds, including text inside documents. To match file names only, add -name:
mdfind -onlyin ~/Documents -name invoice
Either way it uses the Spotlight index, so the same gaps apply. The find command does not use an index at all. It walks the folder and checks every name, which is slower on a big folder but reaches things the index missed:
find ~/Documents -iname "*invoice*"
-iname ignores upper and lower case. If macOS asks whether Terminal can access Documents, Desktop or another protected folder, that is the privacy prompt, and you need to allow it for the command to see inside. The post on mdfind lists more query forms.
In Everywhere, the folder goes into the query as a word: path:Documents invoice matches names containing "invoice" anywhere under a path that contains "Documents". For a folder name with a space, use one word of it, such as path:Client for a folder called Client Work. It keeps its own index of names, so hidden folders and ~/Library show up too, and Documents and Desktop once it has Full Disk Access.
Open Finder > Settings > Advanced, and set When performing a search to Search the Current Folder. For one search only, click the folder's name in the bar under the toolbar.
The default setting is Search This Mac. Change it in Finder > Settings > Advanced, or click the folder's name in the scope bar after you type.
Up to macOS Sequoia, no: the Spotlight menu has no folder scope. From macOS Tahoe 26, Apple describes filtering by a location such as iCloud Drive with the Tab key. For any folder, search from a Finder window, or use mdfind -onlyin <folder> <word> in Terminal.
Yes. A search scoped to a folder looks in that folder and the folders inside it, not only at the top level.
Everywhere keeps track of every file on your Mac, including the folders Spotlight hides and drives you have unplugged. Free for a day, then $19 once.
Version 2.20.3 · macOS 13+ · 4.7 MB · notarised