title: How to increment a numeric value using SET /A inside nested FOR in Windows Command Prompt batch file?
body: <p>This is my batch script:</p>
  
  <pre><code>set vc11path=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
  set path=%path%;C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
  set path=%path%;%vc11path%\bin
  set path=%path%;G:\ida61\flair61\bin\win
  set /a "count = 1"
  
  cd "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib"
  c:
  for %%i IN (*.lib) DO (
   md a:\libs\%%i.fdr
  )
  
  for %%i IN (*.lib) DO (
      for /F "skip=3" %%j in ('link.exe -lib /list %%i') do (
          link.exe -lib /extract:%%j "%vc11path%\lib\%%i" /OUT:"a:\libs\%%i.fdr\%%~nj.n%count%.obj"
          set /a "count+=1"
      )
  )
  
  FOR /D %%i IN ("a:\libs\*.fdr") DO for %%j in (%%i\*.obj) do pcf.exe -g0 "%%i\%%~nj.obj"
  
  FOR /D %%i IN ("a:\libs\*.fdr") DO sigmake %%i\*.pat a:\libs\%%~ni.sig
  </code></pre>
  
  <p>I'm trying to increment <code>count</code> value using <code>set /a "count+=1"</code> in inner loop, but it seems that this command has no effect to increment that variable.</p>
  
  <p>Sorry for my poor English.</p>