title: How to ignore all lines after a specific word on processing lines of a text file in a FOR loop?
body: <p>My problem is solved about the columns not about the lines using <code>skip=3</code>. This ignores the very 3 first lines. So what about ignoring all the lines after the first <code>end</code> word in the example below.</p>
  
  <pre><code>1121.19, 1638.66, 16.6098, -4.7339, -4.7339, 2.5, hash:0, -1, -1, -1, -1, 1888, 0, 0
  971.597, 1815.17, 21.085, 1.39876E-006, 8, 4, hash:0, -1, -1, -1, -1, 1905, 0, 0
  971.597, 1825.45, 21.085, 1.39876E-006, 8, 4, hash:0, -1, -1, -1, -1, 1905, 0, 0
  end
  tcyc
  end
  mlop
  end
  lodm
  end
  slow
  end
  blok
  end
  </code></pre>
  
  <p>So I want to ignore all the lines which aren't in my base format which is:</p>
  
  <pre><code>971.597, 1825.45, 21.085, 1.39876E-006, 8, 4, hash:0, -1, -1, -1, -1, 1905, 0, 0
  </code></pre>
  
  <p>Which code is needed to ignore all the lines from the first <code>end</code> word to the end of the file which would ignore the following lines from example input:</p>
  
  <pre><code>end
  tcyc
  end
  mlop
  end
  lodm
  end
  slow
  end
  blok
  end
  </code></pre>
  
  <p>Here's the code I have so far:</p>
  
  <pre><code>if exist 12.txt del 12.txt
  FOR /F "skip=3 tokens=1-8* delims=," %%A IN (C:\Users\Sherlock\Documents\3DReaperDX\Frames\1.txt) do &gt;&gt;12.txt echo model:%%H tx:%%A ty:%%C tz:%%B rx:%%D ry:%%F rz:%%E
  </code></pre>