To search for files by extension in Windows, type a wildcard such as *.pdf or a filter such as ext:pdf into the File Explorer search box. Typing only a word like doc won’t do it, because Explorer then lists everything that contains that word, including folders named doc and files whose properties mention it. [1]
The wildcard or ext: form fixes that, because it limits results to files with that extension rather than any item that happens to contain the letters. [1] The same idea works in Windows 10 and Windows 11.
Below you’ll see the exact steps, how to combine the filter with a word, date, or second file type, and what to do when results look wrong.
What should you know before you search?
File Explorer searches the folder you have open, and that includes every subfolder inside it. If you open Documents and search, Windows looks through Documents and everything beneath it, not the whole PC. Open the folder you want to cover first, such as Documents or a project drive, before you type anything. [1]
Why a plain word returns too much
A plain word is treated as a text search, not an extension search. If you type just doc in the File Explorer search box, you get everything that contains the word doc, not only files with that extension. That includes folders named doc and file properties that contain the word. [1]
So a plain word can bury the files you want under unrelated matches. The wildcard and filter methods in the next sections fix this.
Optional: show file extensions
Seeing extensions in File Explorer makes it easy to confirm that the results are the right type. With extensions visible, a file shows as report.pdf rather than just report, so a stray .docx among your .doc results stands out. This is optional, but it helps when you are checking what a search returned. [2]
The search itself works without it.
Windows 11 and Windows 10
The File Explorer search box works the same way in both versions. You press Windows + E, go to the location, and click the search bar at the top right. [3]
The search steps in this article apply to both.
How do you search by extension in File Explorer?
Searching by extension in File Explorer takes four steps, and the wildcard *.pdf does the work. The same steps apply to any file type.
Open File Explorer. Press Windows + E on your keyboard. [3]
Go to the folder you want to search. Open it, for example Documents or a project folder on an external drive. [3]
Click the search box. It sits at the top right of the window. [3]
Type the wildcard and press Enter. To find PDFs, type:
*.pdf
The asterisk stands for any file name, and .pdf is the extension that must match. For executable files, type this instead:
*.exe
Windows then lists only the files with that extension. [3]
The results should now show only files that end in the extension you typed, with no folders or files that merely mention it in their name.
A few practical examples
*.docxfinds Word documents.*.jpgfinds photos saved as JPEG.*.xlsxfinds Excel workbooks.
When a match is too broad
A search for *.doc also lists .docx files. [1] If you want only the shorter extension, put the extension in double quotes:
*".doc"
This limits the results to .doc files only. [1]
Once the list appears, you can select the files and copy, cut, or move them into a dedicated folder. That is a quick way to gather every PDF or image scattered across a project into one place. [3]
How do you use the ext: filter?
The ext: filter tells File Explorer to match only the file extension, so you can search for a type without pulling in folders or files that merely contain the letters in their name or properties. [1] It works the same way in the File Explorer search box whether you want one type or one type plus a keyword.
Open the folder you want to search in File Explorer and click the search box.
To list every file of one type, type the filter and press Enter. For example, this finds PDFs:
ext:pdf
To narrow the list to one type plus a word, add the word after the filter. This finds PDFs with “budget” in the result:
ext:pdf budget
If you prefer the wildcard style, put the word after the pattern. This does the same kind of search for PDFs related to “contract”:
*.pdf contract
The wildcard form *.pdf and the ext: form are both documented ways to find files with a specific extension rather than every item containing the text. [1] The wildcard version is quicker to type, while ext: is the one that fits neatly with other filters.
A tip for similar extensions
A search for .doc also lists .docx files. [1] If you only want .doc, put the extension in double quotes:
ext:".doc"
The wildcard equivalent is:
*".doc"
Your results now show only files of the type you asked for, with the extra word applied if you added one.
Can you search for several file types at once?
Yes. You can search for several file types in one query by joining ext: filters with the word OR. In File Explorer’s search box, type this to find both JPEG and PNG images:
ext:jpg OR ext:png
The ext: part matches the file extension, and OR tells Search to return files that match either side. [2]
The same pattern works for other pairs. For example, a query for executable and library files uses ext: with .exe on one side of OR and .dll on the other. [3]
Capitalize OR
Type OR in capital letters. Search treats the capitalized word as an operator, so lowercase “or” may be read as an ordinary word to look for instead. Writing it as ext:jpg OR ext:png keeps the meaning clear. [2]
Narrow by kind and date
You can combine filters to cut a long list down. This query looks for document-type files changed yesterday and leaves out anything with “draft” in it:
class:document modified:yesterday NOT draft
class:document limits results to documents, modified:yesterday limits them by date, and NOT draft removes matches containing that word. [2] Learn more in How to Sort Files by Date in Windows 11 File Explorer.
A practical use: you saved several versions of a report yesterday and only want the finished ones. This query hides the files named something like “report draft” so you can see the rest.
You can mix the pieces. Start with an ext: pair to pick your file types, then add a date or a NOT term to trim the results further. [2]
Why are your results wrong or missing?
Most wrong or missing results come down to three things: where you searched, how you typed the extension, and whether the location is indexed.
You searched the wrong folder
File Explorer searches the folder you have open. If you start in Documents, files saved in Downloads or on another drive will never show up. Open the parent folder (or the drive) that should contain the files, then search again.
You typed the extension without a wildcard or filter
Typing a bare doc lists everything that contains the word doc, not necessarily files with that extension. That includes folders named doc and file properties containing the word. [1] Use one of these instead:
*.doc
ext:.doc
The first uses a wildcard, and the second uses the ext: filter. [1]
There is a second catch: either query also lists .docx files in addition to .doc. [1] To narrow the results to .doc only, put the extension in double quotes:
*".doc"
ext:".doc"
So if a search for one type returns a newer format you did not expect, the quotes are the fix.
The location is not indexed
Windows Search relies on indexing for speed, and files in locations that are not indexed may produce fewer results than you expect. [2] If you know a file exists but it does not appear, this is a likely reason. Adjusting indexing and showing file extensions are both suggested as ways to improve accuracy and speed. [2]
An alternative if Explorer still falls short
Third-party tools such as Everything can help when you need broader or faster searches. [2] Use one only if the built-in search keeps missing what you need. For more detail, see Best File Search Tools for Windows.
Which method should you remember?
Remember two patterns: use a wildcard such as *.pdf when you just want every file of one type, and switch to ext: when the search needs more than the extension. [2]
The wildcard is the quickest to type, while ext: combines naturally with a word, a kind or a date, as in ext:pdf budget or class:document modified:yesterday NOT draft. [2] Next time you need a file type, open the folder in File Explorer, type *.pdf, and add ext: only if the results are too broad. [1]
