Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

copy-item: How to exclude files that already exist at destination

$
0
0

Copy-Item -recurse $i.FullName $destination -Filter *.trn

is the line of code that I run to copy sql transaction logs from source to destination.

THis was ok in most version of Windows. but in Windows NT 6.1 it is copying all files irrespective of whether they exist there or not, delaying the copy process.

I researched any switches that would help me avoid copying files that exist at the destination.

Thanks in advance for your suggestions.

 


Viewing all articles
Browse latest Browse all 8411

Latest Images

Trending Articles



Latest Images