Sorry if this question has been asked many times. I have a DOS .exe file. It works well by double clicking it in Windows, which generates some output files in the working folder. However, I need to call it from Python. I have tried the following commands (subprocess.Popen and os.system), but it only opens a DOS window without saving output files. So can someone give me a hint?
Thanks!
CODE
a=subprocess.Popen(r"I:/dosefile.exe")
a1=os.system(r"I:/dosefile.exe")
UPDATE It worked by putting the .py script file to the fold containing dosefile.exe. Is there a way to make it work without migrating .py file?
Figure it out. I need to change the working folder by using os.chdir() if .py file is somewhere else