Setting a batch script to read a text file

  • Thread starter Thread starter Huff.Nate
  • Start date Start date
H

Huff.Nate

Hey,

I am looking for a way to make a command in a batch file read a text
file so that it acts on a list.
i.e.


netsh interface ip set address "Local Area Connection" source=dhcp <-
I want this command to act on each computer in my network.


So basically I am trying to get the above command to read a computer
list.txt file so that when I activate the batch file it runs on every
computer on the network without having to use a login script. Is
there a way?


thanks
onetruehuff
 
Hey,

I am looking for a way to make a command in a batch file read a text
file so that it acts on a list.
i.e.


netsh interface ip set address "Local Area Connection" source=dhcp <-
I want this command to act on each computer in my network.


So basically I am trying to get the above command to read a computer
list.txt file so that when I activate the batch file it runs on every
computer on the network without having to use a login script. Is
there a way?

for /f "%a" in (filename.txt) do Command "%a"
 
Back
Top