title: search and replace in a file using windows batch programming
body: <p>I have a batch file that I want to open a file and do a very simple search and replace of that file and then save (overwrite) the file it did the search and replace on.</p>
  
  <p>I know how to read the first line of a file:</p>
  
  <pre><code>set /p file= &lt; file.txt
  </code></pre>
  
  <p>but struggling on the batch method of reading a whole file and doing search/replace on it.</p>