Asked By Petr Laznovsky
18-Nov-09 05:42 PM
Hi there, I am beginner in the CMD scripting.
I want to get interface list, each iface into each variable. I have two
problems with this. My command is:
for /f "tokens=3,* delims= " %i in ('netsh in sh in') do echo %i %j
I am use local (Czech) language version of WXP and the tranlation of
nesth use two words for loopback ("zpetna smycka" something like "loop
back" with space between those two words). When I try to parse it, there
is problem with delimiter bacause there are two words for loopback in
the column "TYPE", something like this:
Admin State State Type Interface Name
-------------------------------------------------------------------------
Enabled Dedicated dummy
Enabled Dedicated Local Area Connection
Enabled Internal Internal
Enabled Loop Back Loop Back
Second probles is I have no idea how to push ecach line of output (name
of each iface) into separated variable.
Any ideas??
Petr Laznovsky