title: How to iterate string in cmd for loop?
body: <p>I am trying to iterate a string in batch script:</p>
  
  <pre><code>set var="1 2 3"
  
  for /F %%i in (%var%) do (  
    echo %%i
  )
  </code></pre>
  
  <p>and getting this output:</p>
  
  <pre><code>C:\&gt;batch.bat
  
  
  C:\&gt;set var="1 2 3"
  
  C:\&gt;for /F %i in ("1 2 3") do (echo %i )
  
  C:\&gt;(echo 1 )
  1
  </code></pre>
  
  <p>I expect that all 3 numbers will be printed:</p>
  
  <pre><code>1
  2
  3
  </code></pre>
  
  <p>What am I doing wrong?</p>