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

Copy-Item or Robocopy

$
0
0

# Hi,

# I would like to use a simple copy by Copy-Item , but criteria is to exclude a big folder while copying named "Virtual Machines":

 

 

copy-item 

 

 

 

 

 

C:\Users\R2D2\Documents-destinationF:\Backup\Docs-excludeC:\Users\R2D2\Documents\"Virtual Machines"-recurse-verbose

# I tried Copy-Item with -exclude parameter, but somehow only robocopy could use well exclude (/XD) to copy.

robocopy 

 

 

 

 

 

C:\Users\R2D2\DocumentsF:\Backup\Docs/E/XDC:\Users\R2D2\Documents\"Virtual Machines"/LOG+:"C:\Temp\robolog.txt"

# Do you think I have to use Robocopy for this sort of copy tasks? Or just missed something from my Copy-Item example?

# Thanks in advance

# R.

 


Viewing all articles
Browse latest Browse all 8583

Latest Images

Trending Articles



Latest Images