@echo off
for /f %%a in (ips.txt) do call :process %%a
goto :eof
:process
set srv=%1
for /f "tokens=2" %%b in ('nslookup %srv%^|find /i "name:"') do echo %srv% found at %%b >> nslookup_results.txt

 

Läser IP adresser från filen ips.txt