@echo off::port為需要去綁定埠set port=8888for /f "tokens=5 delims= " %%a in ('netstat -ano ^|findstr /c "%port%"') do ( echo pid=%%ataskkill /f /pid %%aGOTO ...
@echo off
::port為需要去綁定埠
set port=8888
for /f "tokens=5 delims= " %%a in ('netstat -ano ^|findstr /c "%port%"') do (
echo pid=%%a
taskkill /f /pid %%a
GOTO :OUTFOR
)
:OUTFOR
pause