dIs there a way to replicate an xcopy functional using powershell?
I thought it was an easy question until I tried some cmdlets.
Let's imagine I've got a folder structure like:
There're files in each folder of course. I need to copy contents of Src to some folder Dst.
With xcopy it'd be like this:
xcopy src dst\ /e /y
PS analog would be something like this:
copy-item src dst\ -force -recurse -verbose
Works great... the first time. The second time it creates a subfolder dst\src and puts files there!
I can't figure out any easy workaround. Can you?
p.s. I know I can use xcopy in PS.
copy-item c:\\src\\* c:\\dst -force -recurse -verbose