I can run on command line this loop:
for /f "tokens=2" %i in ('arp -a ^| Find/i "dynamic"') do echo %i
but if I run the same bat file I get:
^C^C^C^Cthe process tried to write to a nonexistent pipe^C^C^C^C^C^C^C^C^
C:\1\test.bat:
for /f "tokens=2" %%i in ('arp -a ^ |Find/i "dynamic"') do echo %%i
Returned by your arp -a command:
C:\Users\test>arp -a
Interface: xxx.xx.xxx.40 --- 0xbe
Internet Address Physical Address
xxx.xx.xxx.18 xx-xx-xx-xx-xx-xx dynamic
xxx.xx.xxx.26 xx-xx-xx-xx-xx-xx dynamic
xxx.xx.xxx.34 xx-xx-xx-xx-xx-xx dynamic
xxx.xx.xxx.114 xx-xx-xx-xx-xx-xx dynamic
thanks for any help //Simon