title: Nested batch for loops
body: <p>The following nested for-loop drives me mad (on Windows 7):</p>
  
  <pre><code>@echo off
  SetLocal EnableDelayedExpansion
  
  set TESTDIRS=fast mid slow
  set TD=src\test\resources\testsuite
  
  for %%d in (%TESTDIRS%) do (
      set CTD=%TD%\%%d
      echo CTD: !CTD!
          REM Echos the expected path
      echo CTD: %CTD%
          REM Echos nothing -- understandable
  
      for /R !CTD! %%f in (*.fs) do (echo %%f)
          REM Echos nothing -- why?
      for /R src\test\resources\testsuite\fast %%f in (*.fs) do (echo %%f)
          REM Echos expected files
  )
  </code></pre>
  
  <p>I tried various solutions involving disabling DelayedExpansion, call-statements and whatnot, but I never got the inner loop working. I know that I could replace the inner loop by a subroutine call, but there gotta be a way to make it work with nested loops.</p>