AnsweredAssumed Answered

Running Windows Command Prompt from Python

Question asked by mjmiller72 on Feb 15, 2016
Latest reply on Feb 15, 2016 by mjmiller72

I have a program that is normally run from the Windows Command Prompt. The program processes a single file at a time and creates an error log file. I would like to use Python to batch process multiple files in a folder, but I am having no luck at using Python to execute the program. I have tried the subprocess module (both subprocess.call and subprocess.Popen), but the program doesn't seem to run at all or at least doesn't produce the log file. I have also tried os.execv with limited success - the program executed and produced the error log, but then terminated the script after processing the first file with the error message "EOFError: [Errno 10054] An existing connection was forcibly closed by the remote host."

 

Can anyone point me in the right direction to get me started?

 

Thanks!

Mark

Outcomes