Turn on File Explorer content indexing for the folder or file type, then search with content:term or a plain keyword in an indexed location. Without indexing, Explorer usually finds filenames only. If the folder is large, start by narrowing the search with an extension filter such as filetype:txt or filetype:log. The issue is that File Explorer search returns files, not line-level matches. This guide covers the Windows settings, search syntax, and cases where search still fails.

How Windows content search works

Windows Search can look inside files when the folder is indexed or when the file type can be searched directly. File Explorer’s search box is the front end. Indexing Options decide what content gets included for faster searches.

In an indexed folder, a search for a word inside a .txt file can return the file quickly. In a folder that is not indexed, Explorer may find the filename and miss the file body. Search behavior can also differ by file type and by where the file is stored.

What you’ll need

  • A local folder open in File Explorer
  • Access to Windows Search settings and Indexing Options
  • A target folder or drive you want Windows to search
  • A word or phrase that definitely appears inside the file

A plain keyword search in File Explorer may match filenames, properties, or file contents depending on the location. content:term can help target file contents, and filetype: or a file extension narrows the search to the format you want.

Search inside a folder

Search inside a folder
A laptop displays Windows File Explorer with folders on screen

Open the target folder in File Explorer, type a word that appears inside the file into the search box, and wait for results to populate. For plain text files, this is the shortest path when the folder is indexed. Add filetype:txt or filetype:log to narrow the result set.

  1. Open File Explorer and go to the folder that should contain the file.
  2. Click the search box at the top right.
  3. Type a known word from inside the file, such as content:invoice or filetype:log error.
  4. Wait for the results to refresh before changing the query.
  5. If the folder is large, narrow the search with an extension filter first.

Say your .txt file contains the word “calibration” but the filename does not. A query like content:calibration filetype:txt inside the right folder should surface the file if the folder is indexed and Windows can read that file type.

Search non-indexed folders and drives

If the folder is not indexed, use Folder Options > Search > Always search file names and contents. This tells File Explorer to look through file content even when the location is outside the index, but it is slower than indexed search and works best on local folders or drives that Windows can read directly.

This fallback scans files at search time instead of using the index. That means searches can take longer, especially in large folders.

Make Windows index file contents

Make Windows index file contents
Windows Registry Editor shows Windows Search settings and a path edit dialog

Indexing helps File Explorer search file contents more reliably. Add the folder to Indexing Options, confirm that the file type is set to index properties and file contents when available, then rebuild the index if results are stale or missing.

  1. Open Settings > Privacy & security > Searching Windows on Windows 11, or Settings > Search > Searching Windows on Windows 10.
  2. Select Advanced indexing options to open Indexing Options.
  3. Click Modify, then add the folder or drive that holds the text files.
  4. Click Advanced, open the File Types tab, and check that the extension is set to index file contents when available.
  5. If results are missing, click Advanced again and choose Rebuild.

On very large libraries, indexing can take time, so recent edits may not appear until the index catches up.

Text file troubleshooting matrix

Scenario Exact setting to check Expected result Fallback method
.txt files return by content Indexing Options > Advanced > File Types; .txt should be included Search finds the word inside the file body in indexed folders Use content:term filetype:txt in the folder search box
.log files show names but not content File Types; confirm .log is treated like text content if available Search returns matching files, not just filenames, when the file contents are readable Open the folder and search with filetype:log content:term
Folder is not indexed Indexing Options > Modify; add the folder path Explorer searches the file contents more reliably after the folder is added Use Folder Options > Search > Always search file names and contents or run findstr /s /i "term" *.* from Command Prompt in that folder
Search finds filenames but not content Indexing Options > Advanced > Rebuild Stale entries are refreshed and content matches return after the index finishes rebuilding Search the file with content:term after the rebuild finishes
OneDrive file is online-only OneDrive sync status; file should be stored locally for reliable content search Windows can read the local copy more reliably than the cloud placeholder Mark the file or folder Always keep on this device, then search again
Search is blocked by permissions Folder and file permissions in Properties > Security Windows can open and scan the content only if your account has read access Search from an account with read access or adjust permissions

When search still misses content

If indexing is enabled and Explorer still misses text, check file type handling, permissions, and location type. Windows Search works best on local indexed folders.

  1. Open Indexing Options > Advanced > File Types and confirm the extension has content extraction available.
  2. Open File Explorer > Properties > Security on the file or folder and confirm your account has read access.
  3. Check whether the folder is on a network path, USB drive, or OneDrive location.
  4. Run Settings > Privacy & security > Searching Windows > Advanced indexing options > Advanced > Rebuild if the index looks stale.

Picture a folder with 2,000 .csv files on a network share. File names might return immediately, but content search can miss text inside the files if the share is not indexed locally.

Suppose a .log file was edited after the last crawl. A filename search can still work while content search fails until the index updates or rebuilds. That is a common sign that the index is stale.

Common mistakes

Most misses come from search location, index coverage, or file type assumptions. Search from inside the target folder, not from a broad top-level location unless that parent is indexed. Do not expect every extension to behave like plain text, and do not assume content:term will override missing indexing.

  • Searching from the wrong folder level and missing the indexed path
  • Expecting content search in a folder that was never added to Indexing Options
  • Assuming every extension is treated like a text file
  • Ignoring a stale index after recent edits
  • Searching a OneDrive file that is not stored locally

A practical adjustment is to search one folder at a time, then add one extension filter at a time. Start with filetype:txt or filetype:log, then recheck with content:term after the index finishes updating.

Keep reading

Frequently asked questions

How do I search for text inside files on Windows?

Open the folder in File Explorer, click the search box, and search for a word that appears in the file body. For a narrow content search, use content:word or filetype:txt content:word. If the folder is not indexed, add it in Indexing Options first or use the non-indexed search setting for that location.

How do I search Windows text in a file?

Use File Explorer’s search box inside the folder that contains the file, then type the exact text you expect to find. If Windows keeps returning filenames only, open Indexing Options and make sure that folder is included, then rebuild the index if needed.

How do I search in text on Windows?

For plain text files, start with content:term in File Explorer. Add filetype:txt or filetype:log to reduce noise. If the result list is empty, check whether the folder is indexed, whether the file has read permission, and whether the location needs the non-indexed search setting instead.

Why doesn’t File Explorer find text inside my files?

Most often, the folder is not indexed, the index is stale, or Windows cannot extract that file type’s contents. Check Indexing Options > Modify, confirm file type handling in Advanced > File Types, and rebuild the index if the file changed recently.

How do I make Windows Search index file contents?

Open Settings > Privacy & security > Searching Windows on Windows 11 or Settings > Search on Windows 10, then open Advanced indexing options. Add the folder under Modify, confirm the file type content setting, and use Rebuild if results stay missing.

Which file types can Windows Search read contents from?

Plain text files are the safest bet, especially .txt and many .log files. Other types depend on file handlers and filters. If a format cannot be read for content search, Windows may still find the filename and properties.

What’s the fastest way to find files containing a word on Windows?

For built-in search, open the target folder, use content:word, and limit the result set with filetype:txt or filetype:log. If Windows Search still misses the text, use findstr /s /i "word" *.* in Command Prompt as the fallback for that folder.