The following code is in a Global Script Module.
It works fine when called from a button event handler script, but generates an error when run in a gateway timer script. Any ideas what’s happening here?
sPath = "P:\\" for sFileName in os.listdir(sPath): # do Something with each file
The error generated in wrapper.log is
OSError: [Errno 0] No such directory: P:\
I know the directory exists; also as I mentioned it works fine from a button event handler.