I don't know how to name this behavior vividly, just call it loyalcopy
.
Two figures will illustrate it clearly.
I'd like to issue two commands to copy two filesystem nodes (regardless it is a file for a directory):
loyalcopy c:\libsrc\include d:\temp\dest
loyalcopy c:\libsrc\mm_psfunc.h d:\temp\dest
and see result like this:
What actual Windows commands can achieve this effect? I tried xcopy and robocopy, and they do not work as desired. For example, xcopy c:\libsrc\include d:\temp\dest /s
would copy contents inside include
, not creating a mirrored include
directory in destination folder.
On Unix, I know I can replace loyalcopy
with cp -r
to achieve desired result. But is there Windows equivalent of it? Better to have Windows stock commands, no third-party software involved.