0

I have 4 cmd processes, I want if there come's an other one I want to kill it and if there are less then 4 processes of cmd running I want to open an other batch file. Some help would be thankful :-)

tim241
  • 9
  • 4
  • Welcome on Stack Overflow. What did you try to achieve your project ? Look first how to list the number of running process for a special command, how to kill a process by it's PID, how to launch a bash script. Come back again if you don't manage to pull everything together, providing us some code. – technico Aug 08 '16 at 15:03
  • The PID is unique so it will change when you start an other cmd/batch process again – tim241 Aug 08 '16 at 15:28
  • ONce you get the process list by command name, you can get their current PID with. You work on Windows or linux ? – technico Aug 08 '16 at 15:50
  • @Mofi thanks you so much :-). – tim241 Aug 08 '16 at 16:11

0 Answers0