Good Day everyone,
Thank you for taking the time to look at my request.
I currently have a bat file that has this line. it runs that executable.
RebootAllPOEPorts.exe /r:POE1.txt /o:output/POE1.txt /m
the executable initiates a telnet session and runs the POE1.txt file. basically a scripted telnet session.
The POE1.txt file looks like this:
172.16.1.1
WAIT "Login:"
SEND "current password\m"
.... more commands follow
Currently i use this to log into a varying amount of POE's depending on the site and reset all the ports within that poe. In order for me to achieve this i am using the following bat command when i have 2 switches at a site
RebootAllPOEPorts.exe /r:POE1.txt /o:output/POE1.txt /m
RebootAllPOEPorts.exe /r:POE2.txt /o:output/POE2.txt /m
so it is very redundant and time consuming especially when i have 30+ POE's and i need to create a line and and i need to create a new POEx.txt file to represent each POE since the IP address is different.
What i would really like is the following
Basic Change:
To have the main bat file prompt the user for the starting IP address and the ending IP address sequentially run the RebootALLPOEPorts.exe command.
the first line of the scripting text file the execuble reads is the IP address. That would need to be different for each one.
so in essence it would be somethign like this:
RebootPoE.bat
Ask user to input starting iP address
Ask user to input ending Ip address ( only last octet would change . ie 172.16.1.30)
Run this executable multiple times. once each for each IP address in that range. IP would be in the POEx.txt
RebootAllPOEPorts.exe /r:POEx.txt /o:output/POEx.txt /m
The output file would also need to increment with the repeat of this command so there is a log for each POE interaction.
I guess this needs to be some kind of looping crazy smart bat file.
Please help! i will be monitoring this all day to give more feedback if needed!!