views:

5

answers:

0

Hi,

This is part of my image-copy-script: Get-Childitem | where {$.Extension -eq ".png" -or $.Extension -eq ".gif" -or $_.Extension -eq ".jpg"} | Copy-Item -destination $dest -force

It works fine, and it can overwrite files. Well, it can overwrite if the existing file have attribute R or A. Not when its blanked.

Error in red text: "Copy-Item : The file '\server\d$\path\thumbs\007487l.jpg' already exists."

Why?