The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

markrgunn (9) [Avatar] Offline
I'm attempting to do the following:

PS> copy-item c:src c:dest -recurse

If dest does not exist, then everything underneath src is copied into dest. However, if dest does exist, then the directory src appears underneath dest as opposed to the contents of src appearing underneath dest.

Is this correct behavior?

Kiron (38) [Avatar] Offline
Re: Copy-Item
After reading these examples' descriptions...

(((get-help copy-item).examples).example)[1..2] appears to be a bug, but I'm not sure.
If the destination folder exists, use an asterisk in the source to ensure that only its child items are copied:

copy-item c:src* c:dest -recurse