title: Windows batch copy to sort folders into folders based on partial name
body: <p>I have a directory full of folders beginning with 5-digit numbers:</p>
  <pre><code>\12611_Ants
  \12866_Boats
  \13898_Cats
  \13898B_Misbehaving_Cats
  </code></pre>
  <p>I would like a batch script which will create (if necessary) folders in order to sort these folders in groups of 100, so in this example, \12600, \12800, and \13800 would be created, and:</p>
  <pre><code>\12611_Ants -&gt; \12600
  \12866_Boats -&gt; \12800
  \13898_Cats -&gt; \13800
  \13898B_Misbehaving_Cats -&gt; \13800
  </code></pre>
  <p>Leaving me with:</p>
  <pre><code>\12600
  \12800
  \13800
  </code></pre>
  <p>At a later date, I may then have:</p>
  <pre><code>\12600
  \12800
  \13800
  \12825_Bats
  \14055_Pangolins
  </code></pre>
  <p>And I would want it to leave \12600, \12800, and \13800 alone, sorting only the \12825_Bats and \14055_Pangolins folders:</p>
  <pre><code>\12825_Bats -&gt; \12800
  \14055_Pangolins -&gt; \14000
  </code></pre>
  <p>I am getting hung up on selecting the correct sorting folder based on the five digit number.</p>