batch file - stTelnet to multiple IP addresses and log output - unable to end first session -
i have around 600 ip addresses need check host type of. host 1 of 2 possible types of remote testing kit.
i have basic batch file loop through ip addresses via telnet (can't use ssh) , log initial output. can determine host based on initial prompt alone enough. following initial prompt want disconnect , try next 1 , on.
this have got far...
@echo off echo run test.. pause /f "delims=" %%g in (ip_addresses.txt) ( echo %%g >> log.txt plink.exe %%g -telnet -batch >> log.txt echo. >> log.txt exit ) echo complete >> log.txt
this hangs after press key pause, create log.txt first ip address plus first output first host. doesn't exit first telnet session, if it's still waiting input.
is there way force disconnect or close cmd window without ending batch file?
also if has better suggestions open!
Comments
Post a Comment