快速杀死占用8080端口进程的批处理(kill-8080.bat)
@echo off
setlocal enabledelayedexpansion
for /f "delims= tokens=1" %%i in ('netstat -aon ^| findstr "8080"') do (
set a=%%i
goto js
)
:js
taskkill /f /pid "!a:~71,5!"
pause>nul
@echo off
setlocal enabledelayedexpansion
for /f "delims= tokens=1" %%i in ('netstat -aon ^| findstr "8080"') do (
set a=%%i
goto js
)
:js
taskkill /f /pid "!a:~71,5!"
pause>nul