Share via

How do I properly search for a file in Windows Explorer?

Anonymous
2022-03-12T20:10:23+00:00

Okay, I give up and I'm asking a question here: Where do I find definitive guidance on how to search for files in Windows Explorer on Windows 10?

I never get useful results from Windows Explorer. I know that I should be able to use "?" and "*" as globs in the search bar, but not much else. Today, I need to find some specific R script that I wrote, but when I type in "*.R" in the search bar, I get far more results than I want:

.R

.Rdata

.rds

.Rproj

.rdb

.rdx

.Rhistory

and all I really want is the first type: ".R".

And while I would like to solve this specific problem, I'm more annoyed that I can't find a solid reference online on how this would work. For example, if I just hit the "?" help in Windows Explorer, I get this generic, unhelpful pagewith no useful links to something more substantial. I do a Google search and found some basic tutorials, but these two were a little better because they showed you can use "Advanced Query Syntax" (AQS) with a couple examples.

https://helpdeskgeek.com/windows-10/find-specific-files-in-windows-explorer-with-these-search-tips/https://www.howtogeek.com/school/learning-windows-search/lesson4/

I thought the Help Desk Geek tutorial had a nice example because it shows that you could enter "type: .png" in the search bar, so I tried that with my use case as "type: .R" (exactly that, but without the quotes). Windows Explorer churned for an hour and returned nothing. I've been trying it again with "type: .pdf" just for the hell of it, and it returns nothing.

Am I doing something wrong? I went hunting for more information on AQS and found this (official Microsoft):

https://docs.microsoft.com/en-us/windows/win32/lwef/-search-2x-wds-aqsreference?redirectedfrom=MSDN

Note, if you will, that the top of that page states that AQS is part of Windows Desktop Search, which is obsolete technology, and Windows Search should be used instead. I think that AQS is also used by Windows Search (at least maybe the syntax?), but this page is unhelpfully confusing on that point since it seems to point you away from AQS.

I did follow that link for Windows Search (https://docs.microsoft.com/en-us/windows/win32/search/-search-3x-wds-overview), but that whole section seems pointed at developers, and I found nothing that seemed to really be helpful on how to make sure I'm writing proper syntax for a Windows Explorer search.

If there is a helpful, authoritative, and complete help page on Windows Explorer file searching from Microsoft, I feel I have put in a yeoman's effort trying to find it, and I come up empty. Where? Oh where, is the file search guide that will explain this?

Sorry for the rant. I'm frustrated that the real work I want to do today involves a .R file that I can't find, and I feel Windows 10 should have been able to do that much easier than me finally writing this post.

Windows for home | Windows 10 | Files, folders, and storage

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
Answer accepted by question author
  1. @CmdrKeene 90,616 Reputation points Volunteer Moderator
    2022-03-13T00:18:58+00:00

    Yeah this whole space is a mess isn't it? A lot of people go to other search tools but I've never gone that far, I just suffer :)

    But I still think I can help. Here's the reference: Windows advanced query syntax

    And the way to only find specifically *.R (without it acting like you typed in *.R*), you can type this into the search box:

    filename:"*.R"

    6 people found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2022-03-13T04:00:07+00:00

    Yeah this whole space is a mess isn't it? A lot of people go to other search tools but I've never gone that far, I just suffer :)

    But I still think I can help. Here's the reference: Windows advanced query syntax

    And the way to only find specifically *.R (without it acting like you typed in *.R*), you can type this into the search box:

    filename:"*.R"

    Yes, that worked, and returned **ONLY** the "*.R" files (instead of the problem I was having with it returning "*.R*"). Thank you.

    Between the time of my original post and seeing your reply, I continued searching, and I can't find where now, but I found this syntax a little closer to what I was using before, and THIS ALSO WORKS:

    "type:=.R" (just inside the quotes -- not including the quotes in the search bar)

    I'm not sure why that works, if the equal (=) sign is need for assignment or if it is a test of equality, but I'll add that for whomever passes this way again.

    #BEGIN MINI RANT

    I agree, I'm not going to use another search tool -- I think the OS should do this stuff natively. I am highly frustrated that something as basic as file search doesn't have a great tutorial or demonstration page easily accessible to the masses that use Windows. The AQS page you linked to I think is the same one I linked to in my post, and didn't think it was sufficiently complete with all the keywords (for instance, "type", like in my use case, doesn't appear on that page at all, even though Windows Search autofills it in the search box if you select it under "other properties" under Search Tools. And I keep looking at that "Note" at the top of the AQS page and seem to think it's telling me AQS is not for Windows Search -- HORRIBLE LABELING!!!

    #END MINI RANT

    Again, thank you for your help, sir.

    4 people found this answer helpful.
    0 comments No comments