I am trying to find the correct way to extract the following IP Address from a network server, but I am unable to return just the ip address.

Theoretically if I had a 1111s1 as a server, I should be able to grab an Ip Address, but I am still not receiving an answer. Can someone please help me figure this part? I am still new to the Variable Concepts.

---

```
@echo off
:SETUP_PRINTER
cls
mode con: cols=65 lines=30
echo.
echo --------------------------
echo.     Printer Setup
echo --------------------------
set /p SPrnt=Name of Place:
echo.
FOR /F "tokens=2,3" %%A IN ('ping "%SPrnt%s1" -n 1 -4') DO IF "from"=="%%A" set "IP=%%~B"
echo. %IP%
echo. 
echo.  Printer IPs:
echo.
echo.  .30 - Test       .37 - Test
echo.  .31 - Test       .38 - Test
echo.  .32 - Test       .39 - Test
echo.  .33 - Test       .40 - Test
echo.  .34 - Test       .41 - Test
echo.  .35 - Test       .42 - Test
echo.  .36 - Test       .43 - Test
echo.  .23 - Test       .61 - Test
echo.  .24 - Test
echo.
pause
goto MAINMENU

```

---

![Attempted Failure When Tested](https://i.stack.imgur.com/5Wutc.png)