AlphaMouth 0 Newbie Poster

:?: Trying to do a simple query of a list for thier IP's. The problem is the last echo of the variable (_IP) The parsing and seting of the variable seems to work fine Here's what I got:


for /F %%i in (ServerList.txt) do (
set _IP=

for /F "tokens=3" %%v in ('ping %%i -n 1 ^|find /i "Pinging" 2^>nul') do set _IP=%%v
echo "%%i","%_IP%"
)

I've tried setting the "%_IP%" variable to %%v, %v, %%_IP %_IP%, !_IP!, !%_IP%!

I'm stumped. This worked a while a go in a different enviroment. Is there something I'm missing here (to use the ! and echo variables)? Do I need to enable some sort of extensive command line interpreter? I've heard of such a thing before and used it, but didn't set it up.

Thanks guys!

P.S. 1st post here, so be gentle :lol: