batch file close all instance of exe file code example Example: kill process cmd netstat -ano | findstr :3000 taskkill /PID "123" /F