title: Extract Part of a text file in BAT
body: <p>I am capturing a m3U file on a daily basis but wish to parse part of it to another file with the few channels I need. </p>
  
  <p>For example I have renamed my m3U to Test.txt file which say has the following fictional structure:</p>
  
  <blockquote>
  <pre><code>#EXTINF:0,ABC  
  #live link 1
  #EXTINF:0,XYZ   
  #live link 2
  #EXTINF:0,UVW  
  #live link 3
  </code></pre>
  </blockquote>
  
  <p>I would just like to capture say the line staring from "#EXTINF:0,XYZ" and  say the line beneath it to end up with a Output.txt as follows:</p>
  
  <blockquote>
  <pre><code>#EXTINF:0,XYZ   
  #live link 2
  </code></pre>
  </blockquote>
  
  <p>I know that one needs to use the For loop but I am a bit of a noob on this area.</p>