title: PowerShell copy fails without warning
body: <p>Howdy, am trying to copy a file from IE cache to somewhere else. This works on w7, but not Vista Ultimate.</p>
  
  <p>In short:</p>
  
  <p>copy-item $f -Destination "$targetDir" -force</p>
  
  <p>(I also tried $f.fullname)</p>
  
  <p>The full script:</p>
  
  <pre><code>$targetDir = "C:\temp"
  $ieCache=(get-itemproperty "hkcu:\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders").cache
  
  $minSize = 5mb
  Write-Host "minSize:" $minSize
  Add-Content -Encoding Unicode -Path $targetDir"\log.txt" -Value (get-Date)
  
  Set-Location $ieCache
  #\Low\Content.IE5 for protected mode
  #\content.ie5 for unprotected
  
  $a = Get-Location 
  
  foreach ($f in 
          (get-childitem -Recurse -Force -Exclude *.dat, *.tmp | where {$_.length -gt $minSize})
          )
          {           
          Write-Host (get-Date)   $f.Name $f.length       
          Add-Content -Encoding Unicode -Path $targetDir"\log.txt" -Value $f.name, $f.length
          copy-item $f -Destination "$targetDir" -force
          }
  </code></pre>
  
  <p>End of wisdom. Please help!</p>