title: how do i get a batch file to accept input from a txt file?
body: <p>I would like to run commands in a batch file on multiple computers.</p>
  
  <p>For example:</p>
  
  <pre><code>@echo off
  ping %1
  pause
  exit
  </code></pre>
  
  <p>If this batch file were called pingme.bat, and I type <code>pingme.bat yahoo.com</code>, then it would ping yahoo.com. My problem is I want the batch file to accept input from a text file. </p>
  
  <p>For example, <code>pingme.bat computers.txt</code> would read the names of computers listed in the computers.txt file, and do whatever command I specified to be done to them. </p>
  
  <p><code>%1</code> accepts the input I specify when I type the batch file.  Now I would like the batch file to read the lines from that input text file and use them as arguments to the command.</p>
  
  <p>The lines in the text are in list form, not using commas or anything.  </p>