This is a simple command batch to get the local IP address from ipconfig command.
for /f "tokens=2 delims=:" %%i in ('ipconfig ^| find "IPv4 Address"') do set IPADDRESS=%%i
for /f "tokens=* delims= " %%i in ("%IPADDRESS%") do set IPADDRESS=%%i
The first line is to extract IP address from ipconfig command. The second line is just to trim the leading white space.
To run the command line directly in a command prompt, remember to change %%i to %i.