Shell "Explorer C:\FindFiles\
Shell "Explorer C:\FindFiles\ > CopyAsPath.txt
). (I realize that the previous example goes out on a limb, ss windows has become so dominant a part of the landscape, redirection is hardly in place any more.If looking for file names is easy, looking into file's content is a completly different matter.
Reproducing Explorer's find functionality behavior is probably doable with the help of API, but this is nowhere near trivial and way beyond my knowledge.
I do note that I have CScript.exe on my windows machine: I've never used it before, so that's new for me. May I presume that the code above is good to go.Yes, save it as a VBS file and from a command prompt pass that file name to CSCRIPT. You will want to press CTRL-C after a second or two since as it stands (unless you restrict to a folder with just a few files in it as mention in a comment) it will list all Windows Search files.
regarding "Putting MACHINENAME.SystemIndex in the from clause", where do I find my machine's name?You shouldn’t have to do anything there, it will default to the current machine automatically.
My biggest question: does this dataset constitute just file names, or is there any window into the file's contents? That's the piece that File Explorer provides that I would need to be seeing in the SystemIndex table. If it's not there, then does this technique provide more value than Fabrice's stated solution?That’s actually why I passed this along. If I am interpreting this right, it’s not just showing hits from the file system, but rather hits from the Windows Search Index. So this will already have indexed the content of files, as long as you have configured Windows Search to do that on your computer. So the results displayed should include content matches. You will probably have to understand the syntax of the query statement to see how to get the same results as just typing in some text to the Explorer search box.
Maybe this article can help:
https://docs.microsoft.com/fr-fr/windows/win32/search/using-sql-and-aqs-to-query-the-index
Think again, command line is still system admins's favorit tool.