Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: WinIpCfg IP Address
myfile="c:\temp\test.txt" keyword1="Host Name" keyword2="Physical Address" keyword3="IP Address" hostname="" physaddress="" ipaddr="" handle=FileOpen(myfile, "READ") while 1 line=FileRead(handle) if line == "*EOF*" then break a=strindexnc(line,keyword1,0,@fwdscan) b=strindexnc(line,keyword2,0,@fwdscan) c=strindexnc(line,keyword3,0,@fwdscan) if a!=0 hostname=line else if b!=0 physaddress=line else if c!=0 ipaddr=line else continue endif endif endif endwhile fileclose(handle) Message("Parsed Values:", "%hostname%%@crlf%%physaddress%%@crlf%%ipaddr%")
Article ID: W14408
Filename: Using WinIpCfg and Grabbing IP with FileRead.txt
File Created: 1999:12:08:11:21:26
Last Updated: 1999:12:08:11:21:26