8

I'm trying to search for files with their names ending with t.h so if I search in windows search, I want to get files like at.h ct.h abcdt.h - Windows is not returning these results. Instead when I search I get tc.h td.h and tabcd.h which are not what I want.

I'm using the search query name:"t.h" in the file explorer search bar

How do I get windows to return the filenames I want?

New contributor
Mike Zhang is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
1
  • 2
    I would recommend using Everything instead of File Explorer.
    – Ramhound
    Commented 2 days ago

2 Answers 2

10

The search term filename:"*t.h" works - I'm searching for a precise string, with a wildcard that ends with t.h. I haven't tried more complicated searches but in this case it works well enough. There's an "Advanced Query Syntax" reference, but I feel like it's missing a few things.

Screenshot of windows explorer - there's 3 files in the main part of the window abcdt, ct and at and a search box on the top right that says filename:"*t.h"

0
4

If you're okay with a third party option, I recommend File Locator, (formerly Agent Ransack), no affiliation. To me, it's like the Notepad++ of file searching. It can do regular, wildcard, and regex searches. It can grep through the files for strings of text using just a binary compare or regex expressions. It can do size limitations and limits by date range. And anything it finds, it can show you a preview of the text it found, and give you the line number. I wish there was a linux version as it blows grep and find out of the water with its ease of use.

1
  • Great recommendation. You can also configure it to show x lines before and after the line that matches the text, so that you can see it in context
    – Mawg
    Commented 15 hours ago

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.