Batch file to open multiple cmd prompts
- by JHarris
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?