> I'm trying to run a windows batch file from a python script using > subprocess.popen(). > > The issue that I'm facing is that, if i give the batch file as > parameter to the popen function, the script runs, but if i provide a > parameter, it is not working. > > The actual windows command to be executed is: > > test.bat -t ABC_DE_FG_HI_001 "C:\ABCDEFGHIJKLMNOP.TXT"
do something like: subprocess.Popen(r'test.bat -t ABC_DE_FG_HI_001 "C:\ABCDEFGHIJKLMNOP.TXT",shell=True) This is same as doing os.system() If even this results in any error (post back the error message) and try setting the executable argument explicit. subprocess.Popen(r'test.bat -t ABC_DE_001 "C:\ABCD.TXT",executable="test.bat",shell=True) -- O.R.Senthil Kumaran http://uthcode.sarovar.org -- http://mail.python.org/mailman/listinfo/python-list