title: Using Powershell to search for files and copy them using a text file
body: <p>I'm struggling with trying to solve this at the moment as I'm new to Powershell. I have the below challenge to copy a few files from a number of sub-directories.
  This is what I'm hoping to achieve with my script;</p>
  
  <ol>
  <li>specify a directory to be searched  <code>$source</code></li>
  <li>specify the location of a file that contains a list of files  <code>$file_source</code></li>
  <li>specify destination </li>
  </ol>
  
  <p>Processing:</p>
  
  <p>search (1) including sub-directories for the files listed in (2) if exist copy them to (3)</p>
  
  <p>This is all I have been able to come up with, but it doesn't work and I'm struggling on where to go from here. Thanks for looking.</p>
  
  <pre><code>$source= 'C:\Release\Database\' &lt;&lt; has quite a few sub directories  but I want to search from there.
  $file_source = 'C:\Release\SQL_Scripts.txt'
  $target = 'C:\Release\Database1\'
  get-content $file_source| ForEach-Object{ (Get-ChildItem -path $source -Recurse -Filter $_.fullname)  }
  </code></pre>