MLUG: Re: [MLUG - DISCUSSION] Reading a list into a bat file
Re: [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]
Jerry,

Can you install cygwin w/bash?  This would be a really short shell script.

Regards,
Mark
EMAIL:PROTECTED

On Thu, 3 Feb 2005 09:27:57 -0600, Jerry Gamblin <EMAIL:PROTECTED> wrote:
> 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
> 


-- 
"We act as though comfort and luxury were the chief requirements of
life, when all that we need to make us happy is something to be
enthusiastic about."

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