title: Get-ChildItem & Export-Csv with Path from $_.basename
body: <p>I need to add a patch to a filename when exporting which is generated from the <code>Get-Childitem</code>.</p>
  
  <pre><code>Get-ChildItem 'C:\temp\*.txt' | foreach-Object {
  *some magic here*
  } | export-csv -NoTypeInformation -Force -Encoding UTF8 ($_.basename + ".txt")
  </code></pre>
  
  <p>Works fine, but now I want to add a path to the resulting txt files.</p>
  
  <p>I changed the code to </p>
  
  <pre><code>| export-csv -NoTypeInformation -Force -Encoding UTF8 -path "c:\temp\csv_temp\"($_.basename + ".csv")
  </code></pre>
  
  <p>which failed. I also tried:</p>
  
  <pre><code>| export-csv -NoTypeInformation -Force -Encoding UTF8 ("c:\temp\test\"+ $_.basename + ".txt")
  </code></pre>
  
  <p>also with the same result.</p>