@echo off setlocal enabledelayedexpansion set /p port=请输入端口号: for /f "tokens=1-5" %%a in (‘netstat -ano ^| find ":%port%"‘) do ( if "%%e%" == "" ( set pid=%%d ) else ( set pid=%%e ) echo !pid! taskkill /f /pid !pid! ) pause
标签:port else post for exp 进程 window token find
@echo off setlocal enabledelayedexpansion set /p port=请输入端口号: for /f "tokens=1-5" %%a in (‘netstat -ano ^| find ":%port%"‘) do ( if "%%e%" == "" ( set pid=%%d ) else ( set pid=%%e ) echo !pid! taskkill /f /pid !pid! ) pause
标签:port else post for exp 进程 window token find
原文地址:https://www.cnblogs.com/sprinng/p/8127709.html