Ha temp file mehet, akkor az első sort pl így lehet kinyerni: @echo off wmic nic where "NetConnectionStatus=2" get netconnectionid |findstr /v "^Net"|findstr /v "^$" >tmp.tmp set /p alma=<tmp.tmp echo %alma%