Reputation: 45013
I have two Copy-Item commands
Copy-Item "C:\Test\folder1" "\\remote_machine\destination" -Recurse
Copy-Item "C:\Test\folder2" "\\remote_machine\destination" -Recurse
folder1 and folder2 contain folders and files
Both commands are similar, but I get different results
UPDATE: I don't get any error. Problem is about path to second folder. I want content of both folders in one destination folder.
Upvotes: 1
Views: 2440
Reputation: 45013
It's problem with PowerShell - http://groups.google.com/group/microsoft.public.windows.powershell/browse_frm/thread/ae9b8b4424c2af22
Solution for my examples is
Copy-Item "C:\Test\folder1" "\\remote_machine\destination" -Recurse
Copy-Item "C:\Test\folder2\*" "\\remote_machine\destination" -Recurse
Upvotes: 3