title: PowerShell 5 Copy-Item not working
body: <p>I am trying to copy all .pdf files from all folders and sub folder (dirs. and subdirs).</p>
  
  <pre><code>Folder1
    1.pdf
    2.pdf
  Folder1\Foder2\3.pdf
  Folder1\Folder2\4.pdf
  Folder1\Foder2\Folder3\5.pdf
  Folder1\Folder2\Folder3\6.pdf
  </code></pre>
  
  <p>First I used</p>
  
  <pre><code> $source = "c:\Folder1\"
   $desti = "D:\foderA\"
   PS&gt; Get-ChildItem -recurse $source -Filter "*.pdf"
  </code></pre>
  
  <p>It displays all the files in dir and sub dir but when I try to use copy-Item I get the error.</p>
  
  <pre><code> PS&gt; Get-ChildItem -recurse $source -Filter "*.pdf" | % {Copy-Item $_    -destination $desti}
  </code></pre>
  
  <p>Error: Copy-Item : Cannot find path 'C:\Folder1\Folder2.... because it does not exist. Error points to source being non-existent. 
  What am I doing wrong?
  Is it because I have read only on the source drive\Folder?</p>
  
  <p>Thanks</p>