Run a .bat file using python code

rajeshkumar created the topic: Run a .bat file using python code

from subprocess import Popen
p = Popen(“batch.bat”, cwd=r”C:\Path\to\batchfolder”)
stdout, stderr = p.communicate()
Regards,
Rajesh Kumar
Twitt me @ twitter.com/RajeshKumarIn

Tagged :
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x