I need to read each line of a .txt file, line by line, handing in each line as an argument to a process I'm running in the CMD line interface.
In the command line it would look like: "process c:/script.js arguments".
I originally did this using Python:
with open("C:\path\to\document.txt", "r") as fileOpen:
lines = fileOpen.read().split("\n")
for line in lines:
subprocess.call("someProcess C:/path/to/script.js " + line, shell=True)
However due to the need to distribute without dependencies I would now rather not use python for the task. Is there a way to do this using a batch file?
?