title: How to access variable in for loop
body: <p>I am experimenting with for loops and so far have this -</p>
  
  <pre><code>echo off
  set "projectPath=%~1\Translations\"
  
  echo projectPath %projectPath%
  
  cd %projectPath%
  
  set "tmp=f"
  for /r %%g in (*.ts) do (
      echo %%g
      set %tmp%="www"
      echo %tmp%
  )
  </code></pre>
  
  <p>When run tmp is 'f' and I dont know why</p>
  
  <p>Please could someone explain what is going on?</p>