@echo off & setlocal enabledelayedexpansion ::ipconfig>ip.txt netstat -aon |findstr :8004>pid.txt for /f "delims=" %%a in (pid.txt) do ( for /f "tokens=1* delims=:" %%i in ('call echo %%a^|find /i "TCP"') do ( echo %%a ::��ȡ�����ݹ��˺�,д����һ�����±��� rem Echo %%a>>"text.txt" ) ) rem ��ȡ�ļ������� set /P OEM=