Can't access Network Drive through Gateway scheduled script

I am trying to access a specific file in a network drive through a gateway scheduled script. And I am unable to open that drive, it always gives me the error when I am just checking to see if the drive exists using os.listdir(r’U:'): No such file or directory: ‘U:’ .

I thought it might be a problem with me mapping my network drive, but I can run the same command in the gateway script console and I am getting a proper result. Any ideas?

Services are independent of the user logged into the desktop of the server. The gateway simply doesn’t see any drive mappings you do as a user. The gateway’s service wrapper can map drives in the service environment:

https://docs.inductiveautomation.com/display/DOC81/Mapping+a+Network+Drive

1 Like