for /f "tokens=2 delims=:" %%i in ('ipconfig /all ^|find "IP Address"') do echo %%i>ip.txt

for /f "tokens=1 delims= " %%i in (ip.txt) do set ip=%%i