title: Replace first occurrence of text in a .bat script
body: <p>I need to replace the first occurrence of <code>&lt;?php</code> in a .txt file with <code>&lt;?php this is a test</code> from within a .bat file.</p>
  
  <p>If there are further occurrences of <code>&lt;?php</code>, they should not be replaced</p>
  
  <p>How can I do this.</p>
  
  <p>Alternatively (although more dangerous)...I could just delete the first line of the file (assuming it will be <code>&lt;?php</code>) and replace it with the above, but I don't know how to do that either in batch.</p>