title: Key value pair in batch file
body: <p>I am trying to get the value from the map below using the key in my loop. But I am not getting the desired result. When i use the same code outside of for loop then everything is working fine by replacing ! with %. Why is it not working in for loop?</p>
  
  <pre><code>setlocal enabledelayedexpansion
  set map=Abc_Log-Abc;XYZ_Log-XYZ
  
  FOR /D /R %errfolderpath% %%K in (*Log*) DO (
  
  SET folderName=%%~nK
  
  CALL SET folderName=%%map:*!folderName!-=%%
  echo !folderName!
  
  SET folderName=%folderName:;=&amp;rem.%
  echo !folderName!
  
  )
  </code></pre>
  
  <p>Ideally the second echo should print Abc and XYZ where as it is showing <code>;=</code></p>
  
  <p>Please help.</p>