title: Why does echo use a different value of loop-variable than set?
body: <p>I am attempting to use a simple for-loop to create a series of strings followed by a number. However, when I try to add the iterator-variable to the end of the strings, the value which is added is instead the endpoint of the loop.</p>
  
  <p>A simplified version of the script is:</p>
  
  <pre><code>@echo off
  
  set STARTSTRING="Test-
  
  for /l %%x in (1, 1, 26) do (
      echo %%x
      set CONCATENATED_STRING=%STARTSTRING%%%x"
      echo %CONCATENATED_STRING%
  )
  pause
  </code></pre>
  
  <p>Which gives the output:</p>
  
  <p><a href="https://i.stack.imgur.com/o7uOe.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/o7uOe.png" alt="enter image description here"></a></p>
  
  <p>Can someone please explain to me where I am going wrong?</p>