title: Edit (Find and Replace) .ini File with Batch
body: <p>I have searched for an answer to this question and I haven't understood the solution. I am trying to do a find and replace on a .ini file using batch. What Im trying to do exactly is edit php.ini and find all instances of the string "5.4.3" and replace it with "5.6.14". </p>
  
  <p>I was trying to use this based on an answer I saw on stack overflow: </p>
  
  <pre><code>`set "file=C:\wamp\bin\php\php5.6.14\php.ini"
  :loop
  findstr %old% "%file%" &gt;nul || (
  type "%file%"|repl "5.4.3" "5.6.14" &gt;"%file%.tmp"
  move "%file%.tmp" "%file%" &gt;nul
  )
  ping -n 120 localhost &gt;nul
  goto :loop`
  </code></pre>
  
  <p>The execution hangs and I'm not sure why. Any help would be appreciated. </p>