title: How to iterate over array in batch for key=value item
body: <p>I have an array defined as <code>LIST=(a b c d e)</code>. The <code>a, b, c, d, e</code> are set as system variables, eg. <code>a=AAA, b=BBB</code>, etc.</p>
  
  <p>In a batch script, I would like to do a for loop looking like:</p>
  
  <pre><code>for %%i in %LIST% do echo %%i=%%%i% (unfortunately, this doesn't work)
  </code></pre>
  
  <p>What I want to achieve is that <code>%%i (a) = %%%i% (%a%)</code>, which will be resolved as system variable, thus instead of showing <code>%a%</code>, it'll be resolved as <code>a=AAA</code>.</p>
  
  <p>Do you have any idea how to do it in a batch script?</p>
  
  <p>Thanks!</p>