So, I have 2 .bat files (lets call them A and B) A is the Main Programm and B is running in the Background. But now i want to Close B via typing in A "Close B" I want it to work without additional files. I tried using "call" but it didnt work.
Start B with certain title, like this:
start "_operationB_" /MIN cmd /c call cmdB.bat
And in A you can locate B by its title and close it:
taskkill /FI "WINDOWTITLE eq _operationB_"