Windows File Explorer: Does the search function support AND/OR?

Vita 76 Reputation points
2020-08-19T20:50:41.247+00:00

"AND"/"&"/"OR"/"|", please excuse my ignorance; I'm not sure if they're called operands, boolean operators, conditions, switches or something else.

I set up one of my servers (Windows Server 2019) as a temporary always-on desktop client to attempt to recover some lost files, tons of duplicates have been generating thus I need to do some pretty specific searches. Is this supported in the post-Windows10/Server2016 era? The last Windows desktop I used was I believe Windows 7 so I don't remember if it ever did.

I do remember indexing had to be setup but this is on and remotely indexed SMB3 file share so it's all set on that part.

If it's supported, how would it be spelled in conjunction with wildcards, for instance:
18923-windows-file-explorer-search.png
Should I expect the example above to work or am I missing quoting/escaping??

Also, how can I negate things? I see there are now categories, if I wanted to search things that aren't folders (instead of something like *, *.*) a positive match query is (as offered by the system) kind:=folder, so for a negative match is it !kind:=folder or kind:!folder or kind:=!folder or kind:!=folder? Am I even close?

For once I was looking forward to fix it in PowerShell, trying several variations Get-ChildItem -Path .\*.m4a,.\*.m4a -Exclude *'#recycle* -Recurse | Move-Item -Destination .\startover but some software made directories after every file apparently to store metadata and when it runs it fails because a file cannot overwrite a directory with a matching name, the scripting I came up with is not file-type-aware, only filename-aware. If you have any other advice I'm happy to hear it. :)

Thanks!

Windows for business Windows Client for IT Pros User experience Remote desktop services and terminal services
Windows for business Windows Server User experience Other
Windows for business Windows Client for IT Pros User experience Other
{count} votes

Accepted answer
  1. Anonymous
    2020-08-19T20:53:52.61+00:00

    It can be either depending on your needs.
    https://learn.microsoft.com/en-us/windows/win32/lwef/-search-2x-wds-aqsreference

    --please don't forget to Accept as answer if the reply is helpful--

    2 people found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Vita 76 Reputation points
    2020-08-19T21:05:42.47+00:00

    THANK YOU!

    That oughta do it. I knew Windows was too geeky not to have this. You'll save probably days, there are thousands of files I need to go though. Thanks again!

    0 comments No comments

  2. Anonymous
    2020-08-19T21:30:39.393+00:00

    Glad to hear, you're welcome.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.