title: cp -r equivalent in windows command prompt without error code 1
body: <p>I need to perform the equivalent of <code>cp -r</code> on linux in a windows batch script. The general solution seems to be robocopy (or xcopy <a href="http://ss64.com/nt/xcopy.html" rel="nofollow">which has been deprecated</a>).</p>
  
  <p>So performing the operation:</p>
  
  <pre><code>robocopy source_folder destination_folder
  </code></pre>
  
  <p>copies the source_folder (and the subitems) into destination_folder. If destination folder doesn't exist it will create it BUT, it will return an exit code of 1. How do I perform this copy operation without getting an error code?</p>
  
  <p>(in other words doing the same as <code>cp -r</code> does on *nix systems).</p>
  
  <p>EDIT:
  to clarify what <code>cp -r</code> does it is copy recursively, I want to go from</p>
  
  <pre><code>folder
  |-subfolder_a
      |-my_file.txt
  </code></pre>
  
  <p>to:</p>
  
  <pre><code>folder
  |-subfolder_a
      |-my_file.txt
  |-subfolder_b
      |-my_file.txt
  </code></pre>
  
  <p>where both <code>my_file.txt</code>'s are identical, this would be done (from within <code>folder</code>) on *nix with <code>cp -r subfolder_a subfolder_b</code>. I attempted to do it on windows with <code>robocopy subfolder_a subfolder_b</code> but got error_code 1. I would like to do this without any error codes (and without ignoring the error code).</p>