title: Batch File To Read And Modify Text File
body: <p>Okay, so basically, I have a whole list of links in a plain text Notepad file, each link on a seperate line. All I am wanting to do is to add a bit of text before each link, specifically: 127.0.0.1 and a couple of spaces.</p>
  
  <p>So this...</p>
  
  <pre><code>somelink.com 
  </code></pre>
  
  <p>becomes this...</p>
  
  <pre><code>127.0.0.1     somelink.com 
  </code></pre>
  
  <p>By now you've probably already guessed that I am trying to edit the contents of a text file to make it useable as a HOSTS file in Windows. </p>
  
  <p>So I am wanting some batch file code, executable in a .bat file, which basically reads a Notepad text file, and then add "127.0.0.1 " at the beginning of each line with text on it. I am guessing this is probably a very simple piece of code for someone with some knowledge of MS DOS and batch file code, but that most certainly isn't me, and the only batch files I have ever written have been with help like now.</p>
  
  <p>Thanks for any and all help in advance with this, it really is much appreciated. </p>