Copy an entire directory in DOS

Solved/Closed
pompomp Posted messages 17 Status Member -  
 morisse -
Hello, can someone tell me what the command is to copy an entire directory (including the subfolders and files contained in it) using DOS because I have a directory with 5016 files to copy and I can't imagine typing copy etc... 5016 times! I tried xcopy and /s at the end of the command but those commands are not being recognized.
Thanks

8 answers

  1. gzen92
     
    In the command prompt: "xcopy /?" and there, oh miracle, we find the /E parameter which copies subdirectories.
    -> xcopy /E "doss_in" "doss_out"
    49
    1. pompomp
       
      Wow, 4 years since the topic was opened! Thanks for the gzen92. Fortunately, I had found it in the meantime, but at least it will have closed a topic that I should have closed a long time ago.
      0
      1. giovanni_vizzi Posted messages 16 Status Member > pompomp
         
        Hello,
        I read the whole post but found no solution !!!!

        I want to copy the folder lili that is on the D:\ partition and put it in the folder A that is in c:\documents and settings/gio/desktop/A

        I had already posted to get the solution but I don't want to wait 4 years like you, so please give me the solution with the exact syntax

        See you soon

        And thanks in advance
        0
      2. slim > giovanni_vizzi Posted messages 16 Status Member
         
        Sorry for the delay, unfortunately I just saw this post, so I'm giving you the procedure to follow


        under DOS, directories exceeding 8 characters are not recognized, for example: c:\my documents and settings/gio/desktop/A will become c:\docume~1\gio\desktop\A

        so in the command line do this:
        CD D: enter
        cd lili
        copy *.* c:\docume~1\gio\desktop\A\
        Good luck...
        2
      3. morisse > slim
         
        without wanting to come across as an idiot, I find that your explanations are not very clear

        how to copy what is here: C:\Documents and Settings\computer name\Desktop

        to a directory here: C:\test

        simple:

        xcopy/E C:\Docume~1\computer name\Desktop C:\test

        Note:
        1. If the destination folder does not exist, it will be created automatically
        2. DOS will ask before starting the copy from source to destination "Does C:\test specify a file name or a directory name for the destination
        <F = File, R = Directory>, you need to type R and then press enter

        It's not complicated to present it like that!

        I've been struggling with this for 2 hours and wandering around forums, no one has been able to post the "for dummies" method
        0