Search code examples
windowscmdxcopy

How to copy the folder structure and files into the destination using a Windows command?


How to copy the folder structure and files into the destination using a Windows command?

I tried the below, but the folder test is not copied, but all folders and files were copied:

xcopy "C:\Users\hpara\Desktop\Test" "C:\Users\hpara\Desktop/Foo" /E /H /I

Solution

  • How about that

    xcopy "C:\Users\hpara\Desktop\Test" "C:\Users\hpara\Desktop\Foo\Test" /E /H /I
    

    ?