Email address obfuscation in effect -- please
click here to turn it off.
[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
- To: MLUG Off-Topic Discussion <EMAIL:PROTECTED>
- Subject: [MLUG - DISCUSSION] Reading a list into a bat file
- From: Jerry Gamblin <EMAIL:PROTECTED>
- Date: Thu, 3 Feb 2005 09:27:57 -0600
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws;s=beta; d=gmail.com;h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding;b=m1PMLvkQs84IA1C6MJ9QW85YknFoKRsj41qtSgdcd4WoLCohitvD0J8G/9SjzqPguJzixGEy+9S7GNke8/qM5+k5G2cUm6ttSKoHkxJEu9VVvdS3TeK4WHD34yPT+RSm1n1VbuTKm8Cmbwc8YUD4Ya/m3XCtG8hATKY9O8a0r7s=
- Reply-to: Jerry Gamblin <EMAIL:PROTECTED>, MLUG Off-Topic Discussion<EMAIL:PROTECTED>
- Sender: EMAIL:PROTECTED
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