@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
window批处理杀死指定端口进程
最新推荐文章于 2024-10-16 10:11:31 发布