I want to make a batch file output a format like this into a text file
00-5E-8A-EE-8D-0D=192.168.0.37|37-YZ
This is the batch file I made
ipconfig /all >e:\ipconfig.txt
find "Physical Address" e:\ipconfig.txt >e:\phyaddr.txt
for /f "skip=2 tokens=12" %%M in (e:\phyaddr.txt) do set Mac=%%M
;The problem is here
echo %Mac%=192.168.0.%1|%1-YZ >>c:\1.txt
The | in the middle is the same as the pipe command under DOS, so if I change it to
echo %Mac%=192.168.0.%1"|"%1-YZ >>c:\1.txt
the output format becomes
00-5E-8A-EE-8D-0D=192.168.0.37"|"37-YZ
Could one of the experts point me to a solution?
[ Last edited by kuzei on 2007-2-1 at 01:40 AM ]
00-5E-8A-EE-8D-0D=192.168.0.37|37-YZ
This is the batch file I made
ipconfig /all >e:\ipconfig.txt
find "Physical Address" e:\ipconfig.txt >e:\phyaddr.txt
for /f "skip=2 tokens=12" %%M in (e:\phyaddr.txt) do set Mac=%%M
;The problem is here
echo %Mac%=192.168.0.%1|%1-YZ >>c:\1.txt
The | in the middle is the same as the pipe command under DOS, so if I change it to
echo %Mac%=192.168.0.%1"|"%1-YZ >>c:\1.txt
the output format becomes
00-5E-8A-EE-8D-0D=192.168.0.37"|"37-YZ
Could one of the experts point me to a solution?
[ Last edited by kuzei on 2007-2-1 at 01:40 AM ]
