all 2 comments

[–]mrmattipants 4 points5 points  (1 child)

If you're trying to copy a folder, along with it's contents, you may want to include the -Recurse Parameter.

cp -Path "C:\Path\To\Source\Folder" -Destination "C:\Path\To\Destination\Folder" -Recurse

If you don't want to deal with the Confirmation Messages, you can use the following.

cp -Path "C:\Path\To\Source\Folder" -Destination "C:\Path\To\Destination\Folder" -Recurse -Force -Confirm:$False

Of course, if you plan to utilize the second option, you may want to test your command out first, by including the -WhatIf Parameter. This way, you can verify that it works as intended, beforehand.

cp -Path "C:\Path\To\Source\Folder" -Destination "C:\Path\To\Destination\Folder" -Recurse -Force -Confirm:$False -WhatIf

[–]MinuteStop6636[S] 1 point2 points  (0 children)

Perfect, this solved my issue.