1

Does anyone knows how to kill a batch file w/in another batch file?

Scenario: batch file #1 is running (or looping) in the background. While #1 is on the background, a separate (not w/in batch file #1) batch file is activated manually with a code inside killing batch file #1.

It's like the opposite of call (I guess).

Is this possible and how?

Andriy M
  • 76,112
  • 17
  • 94
  • 154
ella
  • 11
  • 1
  • 2
  • See the accepted answer on [this question](http://stackoverflow.com/questions/1807794/how-to-capture-the-pid-of-a-process-when-launching-it-in-dos) – Vik David May 06 '11 at 20:22

2 Answers2

1

Taskkill Command can end a process

Tasklist Command will list out all the process

Also you may use find command to find the process that wanted to kill

GaryNg
  • 1,103
  • 9
  • 16
0

You can kill a batch file from another batch by querying the window title. See this blog for more info: http://dotnetcrunch.wordpress.com/2014/04/24/kill-batch-file-script/

Karanvir Kang
  • 2,179
  • 19
  • 16