I am trying to run a python file 'app.py' that is in my network path folder and print the result of whether it is running successfully or not. This is my code
import os
filepath = '\\\\server\folder'
os.chdir(filepath)
str=('app.py')
p=os.system(str)
print(p)
However this gives me the following error:
'\\server\folder'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory.
'app.py' is not recognized as an internal or external command,
operable program or batch file.
Can I not change my directory to network path?? Then how can I execuate the file from my network folder? Thanks!