title: batch/bat to copy folder and content at once
body: <p>I'm writing a batch script that does a copy. I want to script it to copy an entire folder. When I want to copy a single file, I do this </p>
  
  <pre><code>copy %~dp0file.txt file.txt 
  </code></pre>
  
  <p>If I have a folder with this structure, is there a command to copy this entire folder with its contents all at once while preserving the exact structure.</p>
  
  <pre><code>mainfolder/
    file1.txt
    file2.txt
    insidefolder/
       file3.txt
       file4.txt 
       file5.txt
  </code></pre>