title: Windows batch: Iterate over mulitple files lines at the same time
body: <p>Is it possible to iterate over the lines of multiple files at the same time? I need to output a file by joining the lines in two different files (and add some extra words).</p>
  
  <p>I know the CMD command:</p>
  
  <pre><code>FOR %variable IN (set) DO command [command-parameters]
  </code></pre>
  
  <p>But that does not help if you need to iterate over two files at the same time.
  More precisely, I need to the following:</p>
  
  <pre><code>While the first file is not ended
     line1 &lt;- READ a line from the first file
     line2 &lt;- READ a line from the second file
     WRITE on a third file line1 + line2
  </code></pre>
  
  <p>I'm looking for a way to accomplish what I'vve previously describing in a <strong>dos batch</strong> file. Thanks!</p>