title: Select files in Windows using list file with base names and wildcards
body: <p>I am trying to select a subset of (jpeg) files from a directory based on a set of base names in a list file that contains the base names.</p>
  
  <p>The directory contains tens of thousands of files with names like:</p>
  
  <pre><code>1234_Inlet.jpg
  5678-Upstream.jpg
  12345_Outlet.jpg
  67890-Downstream2.jpg
  D0305_DownstreamFace.jpg
  NBSheep6-UpstreamView2.jpg
  </code></pre>
  
  <p>That is, there is a variety of base names containing varying lengths of alpha-numeric characters, always followed by either a hyphen or underscore, then more characters, followed by ".jpg".</p>
  
  <p>The list I would use to select a subset of files from this directory will contain the base names only:</p>
  
  <pre><code>1234
  5678
  12345
  67890
  D0305
  NBSheep6
  </code></pre>
  
  <p>Can anyone tell me how to structure a batch file with appropriate looping and wildcards to select and copy a subset of files like these and write them to a new directory?</p>