Finder fixes and how-tos
Finder's list view can open a whole folder tree in one click, and Terminal can print every file in it as a single list. Here is both, with what to do when nothing expands.
Switch the window to list view (⌘2, or View > as List). Then hold Option and click the small triangle next to a folder. Finder opens that folder and every folder inside it, all the way down; Apple's design guidelines use this exact Finder example. Option-click the same triangle again to close the whole branch.
The keyboard route works on a selection: select one folder, or press ⌘A to select everything in the window, then press Option-Right Arrow to expand the selection and everything under it, and Option-Left Arrow to collapse it. Without Option, Right Arrow and Left Arrow open and close the selected folders one level only.
Apple's keyboard shortcuts page lists only the plain arrows (for list view). The Option versions aren't on it, but they are how the standard Mac outline list behaves, and Finder's list view is built on that list.
Every folder you open has to be read and drawn. Try this on a project folder or a photo library with thousands of subfolders and Finder can freeze for a while, as several people report. Expand one branch at a time, or skip expanding altogether and use a flat list (next section).
If what you want is every file under a folder, in one list rather than a tree, there are two good ways.
Open the folder and press ⌘F. In the bar under the toolbar, click the folder's name rather than This Mac, so the search stays inside it. Set the rule row to Kind is Any to list everything, or to Document or Image to narrow it; the + button on the right, below the search field, adds more rules. Results from every subfolder appear in one list. Control-click a result and choose Show in Enclosing Folder to jump to the subfolder it lives in.
Finder's search runs on the Spotlight index, so hidden files and anything Spotlight skips won't appear. Terminal lists everything.
cd "/path/to/folder"
find . -type f
That prints every file in the folder and all its subfolders, one path per line, including hidden ones such as .DS_Store. To leave out anything hidden, and to count what is left:
find . -type f -not -path '*/.*' | wc -l
Both commands only read; they change nothing. Add > ~/Desktop/files.txt to the first one to save the list to a file. For a drawn tree rather than a list, see the tree command on Mac. If you want the files moved into one folder rather than listed, that is what flattening a folder structure covers.
A fully expanded tree is easy to get lost in. Click a column heading in list view to sort by it, or choose View > Show Path Bar to see where the selected row sits. Sorting files in Finder covers the sort options in more detail. Collapse the tree again before you move or copy things, so you don't drag a branch you can't see.
When you only need to find a file somewhere under a folder, expanding and listing both do more work than you need. In Everywhere, path:Invoices lists every file and folder whose path contains "Invoices", across all its subfolders, in one list that shows each result's folder. Add a word or ext:pdf to narrow it, and press ⌘↵ to reveal a result in Finder. Note that path: matches any part of the path, so it also picks up other folders with that name. Folders such as Desktop, Documents and Downloads are covered once Everywhere has Full Disk Access.
Switch to list view with ⌘2, then Option-click a folder's disclosure triangle. Finder opens that folder and every folder inside it. You can also select folders (⌘A for all) and press Option-Right Arrow.
In list view, Option-click the triangle of the open folder, or select the folders and press Option-Left Arrow. Plain Left Arrow closes only the selected folder, one level.
Run find . -type f in Terminal from inside the folder for one flat list. In Finder, press ⌘F in the folder, pick the folder's name as the scope and set Kind to Any; results from every subfolder appear together.
The triangles appear only in list view, so switch with ⌘2. If they're still missing, untick View > Use Groups: a grouped list shows no folder triangles.
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