Windows Search for exact filename and extension only

21

2

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

xaav

Posted 2017-01-01T23:54:06.163

Reputation: 415

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 – 2017-01-02T00:01:08.413

5I have attached a picture that shows that Windows.h is present, but I do not want to see all of the other results. – xaav – 2017-01-02T00:18:00.967

Answers

31

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

name:Windows.h

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

name:=Windows.h

Stephen Rauch

Posted 2017-01-01T23:54:06.163

Reputation: 2 455

2Note 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 – 2019-06-14T09:42:13.970

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 – 2019-11-08T05:12:38.613