Batch file to open multiple cmd prompts
Posted
by
JHarris
on Super User
See other posts from Super User
or by JHarris
Published on 2012-11-13T15:31:06Z
Indexed on
2012/11/13
17:03 UTC
Read the original article
Hit count: 185
I am trying to write a batch file that will automate the following manual process:
- Open a new cmd prompt (prompt1)
- Run a bat file (b1)
- Run a program (that will continue to run)
- Minimize prompt1
- Open a new cmd prompt (prompt2)
- Run a bat file (b1)
- Run a different program (that will continue to run)
- Minimize prompt2
I've found ways to open multiple instances of cmd to run different things, but after I've run the first thing (b1), I then need to run a program in that same cmd window.
I currently have
start /min cmd /k C:\Users\db2admin\python_environment\Scripts\activate.bat
start /min cmd /k C:\Users\db2admin\python_environment\Scripts\activate.bat
This opens the two windows and runs the bat, great, but now I need to execute another command (running a python file) in each of the cmd windows. How do I send commands to each prompt?
© Super User or respective owner