Share via

How do I do a Windows file search by file contents with an asterisk (wildcard) in the first character?

Anonymous
2023-05-02T07:43:28+00:00

Hello,

I am struggling to use wildcards for searching for files in Windows by content, in the specific case where the wildcard replaces the first character. So, for example, if I am searching for files with the word foobar in them then:

  • Searching for foobar will find them.
  • Searching for foob*r will find them.
  • Searching for fooba* will find them.
  • Searching for *foobar will find them.
  • Searching for *oobar with not find them.

Wrapping the word is quotation marks, or using the prefix content: does not appear to change this behaviour.

Can anyone explain to me why this is? How would I then search for all documents containing the word: foobar, noobar or oobar? I assume this behaviour is replicable on other PCs, but to be clear, I have only tried it on mine (Windows 10) for now.

Many thanks in advance for any insights offered!

Best,

Eddie

Windows for home | Windows 10 | Cortana and search

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

8 answers

Sort by: Most helpful
  1. Anonymous
    2023-06-06T13:57:52+00:00

    The Microsoft documentation that Haneem pointed me to (this page), clearly states that the wildcard character can be used "anywhere in a character string". So before reverting to third party software, I think I'd rather understand first whether the fact it cannot be used in the first character in a string (for searching for content only, not file name) is a bug that will one day be fixed, or some kind of permanent deficiency in Windows search.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2023-05-03T08:51:11+00:00

    Hi Hanem,

    Please can you help me to understand why your screenshot does not also show file 4.docx, which contains the word barfoo?

    My understanding of the wildcard symbol (*) is that barfoo should come up as a match for the search query *foo. Because the wildcard should allow the prefix bar to be included. Can you help me understand what I am missing here?

    To make sure we are on the same page, I will also attach a screenshot of my own Windows 10 environment, which as you can see gives the same result as with your Windows 11 environment.

    Best regards,

    Eddie

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2023-05-03T07:47:53+00:00

    Hello Eddie,

    Thank you for your response.

    I tried reproducing the issue, and it seems to work fine.

    Can you please select "Documents" on top of the search results after typing your search and see if it will show the documents? This method seems to work, as shown in my screenshot attached.

    Please let me know if you have any questions.

    Best regards,

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2023-05-02T13:44:20+00:00

    Hi Hanem,

    Thank you very much for the fast reply. The hyperlink you provided to the page "Examples of wildcard characters" was very interesting. However, unfortunately it didn't solve my problem.

    In the following zip file I have created 4 Microsoft Word documents. Each document contains one of the following 4 words:

    1. foobar
    2. noobar
    3. oobar
    4. barfoo

    https://1drv.ms/u/s!AkK3zAtp-nuMiu9Jo-KwI_oVCDw8LQ?e=0dnRmJ

    If I extract the files into a folder, and run a search for ?oobar, or *oobar, then based on my understanding of how wildcard characters work, I would expect to see 1, 2 and 3 served up as results. But this is not what happens. I can replicate this on other PCs. Do you know why this doesn't work?

    Best,

    Eddie

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2023-05-02T09:31:11+00:00

    Hello Eddie,

    My name is Hanem, an independent advisor, and I'm here to help you.

    I'm sorry that you are experiencing this issue, and I will try my best to assist you.

    Kindly refer to the link below on how to use wildcard characters on Windows search. The link will also give you more information regarding the same.

    https://support.microsoft.com/office/examples-o...

    For any issue regarding Windows search, please follow the steps on the link below.

    https://learn.microsoft.com/troubleshoot/window...

    Feel free to reply on this thread if you still need further assistance, and I'll be more than happy to assist you.

    Best regards,

    Was this answer helpful?

    0 comments No comments