title: A .bat or .wsh script that can search for files
body: <p>I am looking for some examples of a .bat OR .wsh script that can do the following:</p>
  
  <ul>
  <li>Recursively read file names in a directory with a user-provided extension (.dll, .exe, etc)</li>
  <li>Search a user-provided directory for the above file names</li>
  <li>Generate a txt or xls report of the findings, like: x.txt was found in "C:\temp", "C:\blah"</li>
  </ul>
  
  <p>TIA.</p>
  
  <p>EDIT:</p>
  
  <p>Oops, I should clarify: there are two directories and two searches here.</p>
  
  <p>Search 1:</p>
  
  <ul>
  <li>Search a user provided directory "Dir 1" for all *.dll's.</li>
  </ul>
  
  <p>Search 2:</p>
  
  <ul>
  <li>Search a different user provided directory "Dir 2" for the file names generated in Search 1.  This search also needs to be recursive.</li>
  </ul>
  
  <p>So, if Search 1 finds foo.dll, foo2.dll and foo3.dll in Dir 1, Search 2 should look in Dir 2 for foo.dll, foo2.dll and foo3.dll, and provide a report (simple listing) of each found file.</p>