title: Why won't this increment work in batch?
body: <p>Why will this not increment? I am using this in a batch file. It does everything correctly, except it doesn't increment. What am I doing wrong?</p>
  
  <pre><code>@SET variable=1
  @echo How many increments should be created?
  @set /p increments=
  @echo off
  
  @FOR /l %%x in (1, 1, %increments%) do @(
  @SET /A variable=variable+1
  @echo %variable%
  )
  
  @ECHO Program Complete!
  @pause
  </code></pre>
  
  <p>Edit: This is not a duplicate, this is an entirely different question.</p>