title: Batch 'FOR' Loop Parser
body: <p>I have a small block of code that is supposed to parse through a file called data.dta but for some reason it keeps saying ( unexpected at this time, here is the code(I put a comment by the line that gives me an error):</p>
  
  <pre><code>:load
  cd %appdata%\.Trek
  FOR /f "eol=#" %%t IN (Resources\Data\data.dta) DO ( ::problem line
          set count=1
      set cor=0
      FOR /f "tokens=1-2 delims=^=" %%f IN ("%%t") DO (
          If %count% == 1 (
              IF %%f==VERSION set cor=1
          )
          If %count% == 2 (
              IF %cor%==1 (
                  set cor=0
                  set ver=%%f
              )
          )
          set /a count=%count%+1
      )
  )    
  Title TREK Unmounted Console Version: %ver%
  </code></pre>
  
  <p>Contents of data.dta:</p>
  
  <pre><code>VERSION=ALPHA 2
  </code></pre>