stop kill network connection using cmd line code example

Example 1: stop kill network connection using cmd line

FOR /F "tokens=4 delims= " %%P IN ('netstat -a -n -o ^| findstr :8080') DO TaskKill.exe /PID %%P

Example 2: stop kill network connection using cmd line

findstr :8080

Example 3: stop kill network connection using cmd line

TaskKill.exe /PID <value>

Example 4: stop kill network connection using cmd line

%%P instead of %P

Example 5: stop kill network connection using cmd line

"tokens=4 delims= "

Example 6: stop kill network connection using cmd line

FOR /F ... %variable IN ('command') DO otherCommand %variable...

Example 7: stop kill network connection using cmd line

FOR /F "tokens=4 delims= " %%P IN ('netstat -a -n -o ^| findstr :8080') DO @ECHO TaskKill.exe /PID %%P