stop.bat 189 B

123456789
  1. @echo off
  2. set port=9090
  3. for /f "tokens=1-5" %%i in ('netstat -ano^|findstr ":%port%"') do (
  4. echo kill the process %%m who use the port
  5. taskkill /pid %%m -t -f
  6. goto q
  7. )
  8. :q
  9. pause