All articles

How to Search Inside Files on a Mac, by Words or by Meaning

· 6 min read

To search inside files on a Mac, press ⌘Space and type a word or phrase you remember from the document: Spotlight looks through the text of PDFs, Word and Pages documents, emails and notes, not just file names. In a Finder window, ⌘F does the same with filters you can stack. When you remember what a file is about but not its exact words, you need a search by meaning, which is what Folia Files adds on top of Spotlight.

Below: how to get the most out of Spotlight, why it sometimes misses a file you know is there, and how to search documents, screenshots and photos by words or by meaning.

Search file contents with Spotlight

Spotlight is macOS's built-in index. It reads the text of most common document types as they are saved, so a search for lease finds the PDF whose name is scan_0042.pdf but whose text mentions a lease.

  • Spotlight window: ⌘Space, then type. Good for one quick lookup.
  • Finder search: open a Finder window and press ⌘F. As you type, Finder searches names and contents together. Click + under the search field to add criteria such as kind, date or size.
  • Search the current folder only: by default Finder searches the whole Mac. Click the folder's name next to This Mac in the search bar, or make it the default in Finder › Settings › Advanced › When performing a search › Search the Current Folder.

Operators that narrow the results

You can type these directly in Spotlight or in the Finder search field:

  • kind:pdf, kind:image, kind:presentation to limit the file type, for example kind:pdf lease.
  • modified: or created: with a date, for example kind:pdf modified:2026.
  • Quotation marks for an exact phrase: "rental agreement".
  • AND, OR and NOT in capitals to combine words: invoice NOT draft.

Search from Terminal

mdfind queries the same index and shows every match, with full paths:

mdfind "rental agreement"
mdfind -onlyin ~/Documents "kind:pdf lease"

Why Spotlight doesn't find a file

When a file you know contains a word doesn't show up, the cause is usually one of these:

  • The index isn't finished. After a macOS update, a migration or a new disk, Spotlight can take hours to rebuild its index. mdutil -s / in Terminal tells you whether indexing is on for a disk.
  • The folder is excluded. Spotlight settings in System Settings have a privacy list; folders and disks added there are never indexed. Check it if a whole folder is missing.
  • The disk isn't indexed. External drives can be excluded or formatted in a way Spotlight doesn't index, and network shares usually aren't indexed at all.
  • There is no text to find. A scanned PDF is often just a picture of each page. Spotlight can't search words that were never turned into text.
  • The index is damaged. If results are clearly wrong, sudo mdutil -E / erases the index of the startup disk and rebuilds it. Expect a long rebuild and a busy Mac in the meantime.

The last limit is the one people hit most: Spotlight matches words, not ideas. Search for electricity bill and you won't find the invoice that only says "energy supply" and "kWh".

Search by meaning with Folia Files

Folia Files is a file manager for the Mac that keeps its own index of what your files say, on your Mac, next to Spotlight's.

What it reads

In Settings › Files and Network › Content Search, the switch Read the contents of documents and images (Documents, Desktop, Downloads, Pictures) is on by default. Folia Files then reads, in those four folders:

  • the text of PDF, Word, RTF, OpenDocument, HTML, text and Markdown files (the beginning of each document: the first pages of a PDF, the first 20 KB of text);
  • the text of your screenshots, recognized on the Mac (Latin alphabet);
  • what your photos show: beach, mountain, dog, receipt, document…

Everything is read on your Mac and is never sent anywhere. New and changed files are picked up shortly after Folia Files starts, then every hour.

The Content Search setting in Settings › Files and Network

Search by words or by meaning

Open Tools › Search Contents… (it is also in Tools › All Tools…). Describe what you're looking for: "rental contract", "electricity bill", "beach photos". Choose All, Documents or Images to narrow the results.

Each result says why it matched: the words found in the file, or Similar in meaning when Folia Files found related words instead. Search for "rental contract" and the lease agreement turns up, marked as similar in meaning. For that, Folia Files uses the word models built into macOS, so search by meaning works in English, French, German, Spanish and Italian. In Portuguese, Japanese and Chinese, the search finds the words you type (Japanese and Chinese text is split into words correctly), but not related words.

Search Contents: "Invoice" finds the invoices on the Mac by the word read in their text

Two details worth knowing:

  • Photos are described with English words (and French ones). To find pictures of a beach, type "beach" (or "plage").
  • Text in screenshots is recognized in Latin-alphabet languages only. Japanese or Chinese text inside an image won't be found.

Make scanned PDFs searchable

A scanned contract has no text for Spotlight or Folia Files to read. Open it in Tools › PDF Tools… and choose Make Searchable (OCR)…: the recognized text is added to the PDF, and from then on Spotlight and the Folia Files index both find it.

Combine contents with other criteria

Edit › Advanced Search… (⇧⌘F) puts the Contents criterion next to name, kind, size, dates and tags, with a choice of engine:

  • Spotlight uses macOS's text index, so it finds words in PDFs and Word documents across the Mac.
  • Scan Disk opens each file in the folder you choose. It's slower, but it works where Spotlight has no index, such as an external drive or a share, for text files: plain text, Markdown, code, JSON, XML.

A search you save appears in the sidebar under Searches and stays up to date.

Or just ask

Tools › Ask Folia… (⌘J) understands plain sentences such as "PDFs over 5 MB in Downloads" or "files not modified for 2 years in Documents", shows what it found and, if you asked for it, what it will do with them before doing anything. Add "containing" followed by a word to look inside text files too. Ask Folia understands English and French on its own, and uses Apple Intelligence on Macs that have it.

Which search to use

  • You remember an exact word or phrase: Spotlight (⌘Space) or Finder (⌘F), with kind: and quotes.
  • You remember what the document is about: Folia Files' Search Contents, by meaning.
  • The file is a screenshot or a photo: Search Contents, with the words on the screen or what the picture shows.
  • The file is a scan: make it searchable once with Make Searchable (OCR)…, then search normally.
  • Words plus size, date or kind: Advanced Search with the Contents criterion.

Search Contents, Advanced Search and Ask Folia are in both editions of Folia Files, from the website and from the Mac App Store. The App Store edition, like every sandboxed app, only reads the folders you have opened to it.