如在多台电脑上用"IPCONFIG /ALL >%COMPUTERNAME%.TXT"命令在不同电脑上收集到多个文本文件,如:
user1.txt 的内容如下:
-------------------------------------------------------------------------
Windows IP Configuration
Host Name . . . . . . . . . . . . : USER1
Primary Dns Suffix . . . . . . . : dime
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接 2:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : 3Com EtherLink XL 10/100 PCI TX NIC (3C905B-TX)
Physical Address. . . . . . . . . : 00-01-02-90-48-60
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.100
DNS Servers . . . . . . . . . . . : 202.96.134.188
-------------------------------------------------------------------------
;
USER2.TXT的内容:
-------------------------------------------------------------------------
Windows IP Configuration
Host Name . . . . . . . . . . . . : USER2
Primary Dns Suffix . . . . . . . : dime
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Accton EN1207D-TX PCI Fast Ethernet Adapter
Physical Address. . . . . . . . . : 00-10-B5-BE-28-8D
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.100
DNS Servers . . . . . . . . . . . : 202.96.134.188
-------------------------------------------------------------------------
如何通过批处理,将Host Name 、Primary Dns Suffix 、Physical Address、IP Address等字段后的结果提取出来,并添加到一个文本文件中,如以下内容:
Host Name ; Primary Dns Suffix ;Physical Address ; IP Address
USER1 ; dime ;00-01-02-90-48-60 ; 192.168.0.1
USER2 ; dime ;00-10-B5-BE-28-8D ; 192.168.0.2
[ Last edited by ITU on 2007-6-4 at 11:48 PM ]
user1.txt 的内容如下:
-------------------------------------------------------------------------
Windows IP Configuration
Host Name . . . . . . . . . . . . : USER1
Primary Dns Suffix . . . . . . . : dime
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接 2:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : 3Com EtherLink XL 10/100 PCI TX NIC (3C905B-TX)
Physical Address. . . . . . . . . : 00-01-02-90-48-60
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.1
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.100
DNS Servers . . . . . . . . . . . : 202.96.134.188
-------------------------------------------------------------------------
;
USER2.TXT的内容:
-------------------------------------------------------------------------
Windows IP Configuration
Host Name . . . . . . . . . . . . : USER2
Primary Dns Suffix . . . . . . . : dime
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter 本地连接:
Media State . . . . . . . . . . . : Media disconnected
Description . . . . . . . . . . . : Accton EN1207D-TX PCI Fast Ethernet Adapter
Physical Address. . . . . . . . . : 00-10-B5-BE-28-8D
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.2
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.100
DNS Servers . . . . . . . . . . . : 202.96.134.188
-------------------------------------------------------------------------
如何通过批处理,将Host Name 、Primary Dns Suffix 、Physical Address、IP Address等字段后的结果提取出来,并添加到一个文本文件中,如以下内容:
Host Name ; Primary Dns Suffix ;Physical Address ; IP Address
USER1 ; dime ;00-01-02-90-48-60 ; 192.168.0.1
USER2 ; dime ;00-10-B5-BE-28-8D ; 192.168.0.2
[ Last edited by ITU on 2007-6-4 at 11:48 PM ]
