1.

Solve : return ip [please help]?

Answer»

How do i return the FIRST 3 incroments of an ip address example 10.10.10 when it usualy is 10.10.10.1 :-? :-? :-? :-? :-?
[size=72]PLEASE HELP[/size]This will probably work, though not very elegant.

Code: [Select]@echo off
for /f "tokens=14-16 delims=:." %%i in ('ipconfig ^| find /i "ip address"') do echo %%i.%%j.%%k

Judging from some of your posts, you might help yourself by getting a good DOS book from the library. You would help us if you POSTED if you have a DOS operating system, or a version of EMULATED DOS in Windows and which version of Windows.

8-)Quote

This will probably work, though not very elegant.

Code: [Select]@echo off
for /f "tokens=14-16 delims=:." %%i in ('ipconfig ^| find /i "ip address"') do echo %%i.%%j.%%k

Judging from some of your posts, you might help yourself by getting a good DOS book from the library. You would help us if you posted if you have a DOS operating system, or a version of emulated DOS in Windows and which version of Windows.

8-)
Thank you, I would LIKE to know of a good tutorial focusing on things like the thisCode: [Select]for /f "tokens=14-16 delims=:." %%i in ('ipconfig ^| find /i "ip address"') Think you
One site you can check out is The Tech Guide. Be sure to read all the pages. It REFERENCES Win2000, once your learn Win2000 DOS any differences with XP can be found in your systems help: HELP command-name

Good luck. 8-)

Batch language is not difficult, just a bit cryptic and obscure.


Discussion

No Comment Found