Setting a batch script to read a text file


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
 
Ad

Advertisements

Ad

Advertisements

H

Herb Martin

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top