Hello.
I need a cmd script for increase ip, for example, if I have 192.168 .1.1 in a IP variable I need calculate 3 ip more, 192.168.1.4, in cmd, no vbs or similar.
Thanks
Example:
SET IP=192.168.1.1
I need calculate 192.168.1.4 , for example
Thanks
script for increase ip
Moderator: DosItHelp
Re: script for increase ip
Code: Select all
@echo off
setlocal enableextensions enabledelayedexpansion
SET IP=192.168.1.1
for /f "tokens=1-4 delims=." %%a in ("%IP%") do (
set /a ddd = %%d + 3
SET newIP=%%a.%%b.%%c.!ddd!
echo !newIP!
)
pause