Need really simple code
Posted: 23 Jun 2008 07:03
I have batch file creation experience - but in another language - I need to create a DOS batch file very quickly - so I could use some help.
1. I want the batch to read a list of IP Addresses (they can either be on
a separate list or in the batch file) and create a variable called %add%
2. I want to then do a simple ping command (this part I already have working) for each IP address
3. If a there is an error - generate a mail message.
4. Translate that IP address into a server name and use that server name as part of the mail message.
The parts I'm having trouble with is 1) reading a list of values and 4) Translating each IP into the appropriate server name.
Can anyone help? Thanks
1. I want the batch to read a list of IP Addresses (they can either be on
a separate list or in the batch file) and create a variable called %add%
2. I want to then do a simple ping command (this part I already have working) for each IP address
3. If a there is an error - generate a mail message.
4. Translate that IP address into a server name and use that server name as part of the mail message.
The parts I'm having trouble with is 1) reading a list of values and 4) Translating each IP into the appropriate server name.
Can anyone help? Thanks