Monday, January 30, 2017

Running multiple commands in multiple prompts from batch

I currently have three batch files and am trying to combine the functionality into one.


run.bat
--------
start "" /min cmd /k first.bat
start "" /min cmd /k second.bat
first.bat
--------
call C:\Users\jh\python_environment\Scripts\activate.bat
coilmq
second.bat
--------
call C:\Users\jh\python_environment\Scripts\activate.bat
python "C:\Users\jh\run\main.py"

So I execute run.bat to get what I want. That opens two command windows, with the respective commands run in each one and then they are minimized. How can I combine all this functionality into one bat script?

No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...