title: Edit text file using batch file
body: <p>I've searched a thousand of example and tried, but none of them actually works for me. My requirement is pretty straight forward, I have a file - config.txt, it has one of lines:</p>
  
  <p>sqlServer=localhost</p>
  
  <p>I'm trying to update this line to:</p>
  
  <p>sqlServer=myMachine\sql2012</p>
  
  <p>I looked examples online, some of them are just working with set variables, or some are not replacing but inserting. There are some examples are writing into a new file, but the new file has line number in front of each line. I don't find a useful instruction how to write batch scripts, and none of the update file batch scripts works for me.</p>
  
  <p>It will be very helpful if you leave some comments.</p>
  
  <p>Thanks in advance</p>