title: Batch File to Selectively Copy Files To an Identical Folder Tree
body: <p>I have 2 identical folder trees, let's call them <code>C:\First</code> and <code>C:\Second</code>, with many subfolders. <code>C:\First</code> has many XML files in many sub and sub-sub folders. <code>C:\Second</code> just has the folder tree created.</p>
  
  <p>I want to go through all XML files in <code>C:\First\*</code> and put it in it's equivalent place in <code>C:\Second</code>. </p>
  
  <p>But first I want to check if a file with the same name exists in the <code>C:\Current</code> folder (no subfolders there), in which case I will copy the one from <code>C:\Current</code> to the proper sub-sub-sub folder in <code>C:\Second</code>.</p>
  
  <p>In other words, I want to copy the whole structure and files from <code>C:\First</code> to <code>C:\Second</code> but I want to take the latest version that may or may not exist in <code>C:\Current</code>. And, in <code>C:\Current</code> there are many files I don't care about.</p>
  
  <p>Example:
  <code>C:\Current</code> has these files:</p>
  
  <pre><code>a.xml
  b.xml
  1.xml
  c.xml
  d.xml
  e.xml
  2.xml
  f.xml
  g.xml
  3.xml
  </code></pre>
  
  <p>In <code>C:\First</code> I have <code>a.xml, b.xml, c.xml, d.xml, e.xml, f.xml, g.xml</code> spread out in its sub-folders.</p>
  
  <p>I hope I'm not being too confusing...</p>