While searching for Windows.h, I discovered some rather annoying search behaviour on Windows 10. Rather than being presented with a single result of Windows.h, I was presented with an entire laundry list of files with "Windows" in them and "h" in them, which is not what I wanted. Searching for "Windows.h" did not help.

How can I search for Windows.h and receive only files with exactly that name?

enter image description here

  • Have you considered that your doesn't have a file named Windows.h that's typically only on a pc with the appropriate SDK installed – Ramhound Jan 2 '17 at 0:01
  • 6
    I have attached a picture that shows that Windows.h is present, but I do not want to see all of the other results. – xaav Jan 2 '17 at 0:18

If you want to match only filenames and not file contents, you can qualify the search with name: like:


If you want an exact filename match, you can qualify the search with name:= like:

| improve this answer | |
  • 2
    Note that the term name is translated to the system language. You can figure out your language's term by changing the view to "detailed list", and check the name of the column for file name. Example in Swedish, it says "Namn", so you type namn:=. – Liggliluff Jun 14 '19 at 9:42
  • 2
    This works with other explorer items as well, I just found I could use extension:=.h to find all .h files regardless of name. – PeterJ Nov 8 '19 at 5:12

If you need to search for specific files, which includes special characters, such as (, ), spaces and numbers in between, then you'll need to tilde + quote it.

For example, this is a wildcard search for all duplicated filenames, with any extension, that Windows has added (0-9) before the dot:

~"* (?).*"

enter image description here

Note that ? will catch any single character, not just a digit, so above example will also find files/directories that have a space + any single character between parentheses + dot. For example: My Directory (A). with a dot.

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.