YasserKhalil
YasserKhalil

Reputation: 9568

Prevent auto-closing windows batch file

I have a batch file that enables me to run multiple python files at the same time and it is ok at this point.

@ECHO ON

start python "C:\Users\Future\Desktop\Pop1.py"
ECHO Running Pop1
start python "C:\Users\Future\Desktop\Pop2.py"
ECHO Running Pop2

PAUSE

But there is a problem for me, when the python file executed, I need to follow the print statements to follow the program. When I execute the batch the console windows for both the python files disappears quickly. How can I keep them open to be able to follow the execution of python files?

Upvotes: 1

Views: 425

Answers (1)

debugger
debugger

Reputation: 1736

you just have to include -i after python

@ECHO off

start python -i "C:\Users\Future\Desktop\Pop1.py"
start python -i "C:\Users\Future\Desktop\Pop2.py"

Upvotes: 2

Related Questions