I am trying to use a script to open a file inside a network drive using python. The script is given below:
import os
import subprocess
file_path = r"O:\XXXX\test.xls"
subprocess.Popen(filepath, shell=True)
The network drive requires sign in but I always by default sign it the moment I on the computer. Also, using a os.listdir(folderpath) has no problem going into the network drive and listing all the files in the directory containing the file.
Tried some suggestions from similar posts but they don't work.
I am using Python 2.7, and Windows.
UPDATE:
No error was prompted after executing the script.
I am trying to open an Excel file. The script works to open Excel in other folders within the computer, but just not within the network drive.