MLUG: [MLUG - DISCUSSION] Reading a list into a bat file
[MLUG - DISCUSSION] Reading a list into a bat file
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
It has been along time since I have written any batch files but here
is what I am trying to do.

1) I have a text file with a list of all the computers on campus.
2) I have a clean up script that I need to run on each computer that
deletes files and defrags the hard drives.

Right now the only way I know how to do it is to edit the script for
every computer like

psexec \\computer1 defrag c:\
psexec \\computer2 defrag c:\
psexec \\computer3 defrag c:\


Does anyone know how to read from my text file as a variable so that
it would read through the list and do all the computers?

So the script would look something like this:

psexec \\%comp% defrag c:\

Thanks,

Jerry
_______________________________________________
discussion mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/discussion