If I am doing a search through a number of files for a particular word ("Motor") or file configuration (".pdf"), I can, once the procedure is complete, press <Shift><Right Click>, and then left click on "Copy as Path". That takes all the found elements and stores them to the clipboard, where I can paste them any where I want, i.e., a text file or Excel.
I would like to replicate this functionality using VBA code. I would like VBA to capture a whole series of folder/file paths, based on the search criteria given it. I do know how to use vba to invoke a command prompt, and have the prompt run Explorer from a set folder:
Shell "Explorer C:\FindFiles\
What I don't know how to do is choose a search criteria when running Explorer, and I also don't know how to give VBA visibility to the files it has found. What might also work is redirection (">") which produces sends command-line output elsewhere. (i.e.,
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.
Anything that will support VBA to see the results of a search is what I seek. Thank you.