Very simply I have this code
bat_execution = subprocess.Popen("Bats/test.bat", shell=True, stdout=subprocess.PIPE)
which returns the error
'Bats' is not recognized as an internal or external command, operable program, or batch file
However if I move the bat file out of the Bats directory and keep it in the same level as the python code like below, it runs fine:
bat_execution = subprocess.Popen("test.bat", shell=True, stdout=subprocess.PIPE)
I am using python and Windows 7. I do not get why the path is causing this error.
My test.bat is simply:
echo "test success"