Copy Specific Line Number using Batch

Viewed 24

I am trying to copy to clipboard line by line from a text file to insert the clipboard into a separate command using a batch file.

I have the following text document.

Differences.txt

This is line 1
This is line 2
This is line 3

And I would like to step through this file line by line, copying to clipboard each line. Then execute my command using the line in clipboard. I've already figured out how to save the clipboard to a variable and use it within my command, I am just not sure how to step through the text file line by line.

So the first run through would have the following in clipboard

This is line 1

The second run through would have

This is line 2

And when it finished it would just end the script.

0 Answers
Related