title: Copy items with similar filenames from CSV content
body: <p>I am attempting to create a simple script that can read a CSV file, and find files (.jpgs) with names that contain the CSV contents and then copy those files to a new location.</p>
  
  <p>The CSV contents will be in the following format, 'files' is the header:</p>
  
  <pre><code>Files
  ------
  B000000001
  B000000002
  </code></pre>
  
  <p>The file names will be in the following format:</p>
  
  <pre><code>B000000001.PT01.jpg
  B000000002.PT03.jpg
  </code></pre>
  
  <p>Here is what I have so far:</p>
  
  <pre><code>$ASINs = Import-Csv "C:\share_test.csv"
  foreach($ASIN in $ASINs){
  GCI -Path "C:\test1" | Where-Object{$_.Name -like $ASIN} | Copy-Item -Destination "C:\test2"
  }
  </code></pre>
  
  <p>I am not getting errors, but it is not copying the files that match. I seem to always have trouble with Copy-Item when it gets this specific, so any help is appreciated.</p>
  
  <p>EDIT:
  Ok thank you all for the advice. This is what I have now:</p>
  
  <pre><code>$ASINs = Import-Csv "C:\share_test.csv"
  foreach($ASIN in $ASINs){
  GCI -Path "C:\test1" -Filter '*$ASIN*' | Copy-Item -Destination "C:\test2"
  }
  </code></pre>
  
  <p>Still no dice! What am I doing wrong? I tried the <code>-Filter</code> with and without quotations.</p>
  
  <p>Thanks again!</p>