two files:
server_list.txt - this is your list of SERVERS
SERVER_IP.txt - Outputfile
@echo off
FOR /F %%G IN (server_list.txt) DO CALL :setvars %%G %%h
:setvars
SET COMPUTER=%1
FOR /F "tokens=2 delims=[]" %%A IN ('PING %Computer% -n 1') DO (
SET IP=%%A
)
echo. %COMPUTER% %IP% >> "SERVER_IP.txt"
goto:eof
Tuesday, March 1, 2011
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment