title: Write batch variable into specific line in a text file
body: <p>I have a batch file where I need to write a variable into a specific line of a text file and override what is all ready in that line. I have the code to read specific lines from the file maybe I could switch it around to also write?</p>
  
  <p>Reading lines code:</p>
  
  <pre><code>setLocal EnableDelayedExpansion
  for /f "tokens=* delims= " %%a in (variables.txt) do (
  set /a N+=1
  set v!N!=%%a
  )
  set variable1=!v1!
  set variable2=!v2!
  set variable3=!v3!
  set variable4=!v4!
  </code></pre>
  
  <p>I've tried to add echo <code>%variable1% &gt; !v4!</code> something like that but it doesn't work.</p>