title: Replace text within a text file with Windows command line
body: <p>Without being able to install all sorts of fancy find and replace tools, I need to find and replace strings within text files with the command line from Windows Server 2008.</p>
  
  <p>How would I do that?</p>
  
  <p>Example:</p>
  
  <pre><code>text.md
  
      Hello world!
  </code></pre>
  
  <p>Change to: </p>
  
  <pre><code>text.md
  
      Hello everyone!
  </code></pre>
  
  <p>I'm looking for something like:</p>
  
  <pre><code>for /f %%A in (text.md) do (
  
      set "line=%%A"
  
      if defined line (
  
          // and here the replacement
  
      ) ELSE echo.
  )
  </code></pre>