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 Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,443 questions
Windows 10
Windows 10
A Microsoft operating system that runs on personal computers and tablets.
10,559 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,225 questions
0 comments No comments
{count} votes

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. Dave Patrick 426K Reputation points MVP
    2020-08-19T21:30:39.393+00:00

    Glad to hear, you're welcome.

    0 comments No comments