Batch scripting: read lines and execute a command after every other line read <p>Suppose I have a text file like this</p> <pre><code>node1.log node2.log node3.log node4.log etc... </code></pre> <p>I want to read each line by line and execute</p> <pre><code>alan.exe node1.log node2.log alan.exe node3.log node4.log </code></pre> <p>etc..</p> <p>What is the best way to accomplish this?</p>