title: Batch file to move all files whose file NAME contains a future date (YYYYMMDD) to a seperate folder
body: <p>I need a batch file that will take any files in a given folder with a value for YYYYMMDD <strong>within their name, GREATER than today's date</strong> (for some reasonable range into the future) and move them to another folder.</p>
  
  <pre><code>set MainFolder=..\
  set FutureFolder=.\
  set FutureDaysToCount=90
  set today=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%
  </code></pre>
  
  <p>%today% in the above example will give me (on May 30, 2012): 20120530</p>
  
  <p>What I want to do is loop <strong>dates</strong> from %today% TO %today% + %FutureDaysToCount% and execute:</p>
  
  <pre><code>move *yyyymmdd*.txt .\SomeOtherFolder
  </code></pre>
  
  <p>...for every day in the 90 day range, where <strong>yyyymmdd</strong> would be the numerical equivalent of the current date being processed.  So:</p>
  
  <pre><code>move *20120530*.txt .\SomeOtherFolder
  move *20120531*.txt .\SomeOtherFolder
  move *20120601*.txt .\SomeOtherFolder  REM note new month here!
  </code></pre>
  
  <p>Is there a way to increment days within a loop to accomplish this?</p>
  
  <h2>NOTE</h2>
  
  <p>This is similar, but different from:<br>
  <a href="https://stackoverflow.com/questions/8937944/batch-process-to-move-file-having-date-in-yyyymmdd-format-from-one-folder-to-ano">Batch process to move file having Date in YYYYMMDD format from one folder to another folder</a></p>