Backslash escape on Gateway Event Script

I have a script that is pulling in a CSV file and dumping it into SQL every once in awhile (Project.FieldData.CSVtoSQL). I’m trying to run the script from the gateway for a number of reasons.

In the script I have a line that reads ‘inputFile=“M:\Vicon\SiteStatus - Current.csv”’

the script was written and tested running on the client side. After it was all working I added in a tag to call it via the Gateway Tag Change Script.

When I run it on the gateway machine it returns an error (via system console) ‘No such file or directory: “M:\Vicon\SiteStatus - Current.csv”’. Note the double backslashes. I tried changing the script just have the single backslash. The error message was exactly the same.

Calling the script from a Client Tag Change Script works fine. any suggestions on how to get the gateway script to work?

Thanks!

Does M: exist from the perspective of the gateway?

Yes, M:\ is mapped and accessible on the gateway machine.

Using a mapped drive on the gateway requires some additional configuration, see this thread for more info: inductiveautomation.com/for … ive#p46408

Kevin - I had seen a post about mapped drives for some other issue but since the error messages were different I didn’t connect the two.

I (temporarily) put the file on a local drive, modified the script, and it worked like it was supposed to on the gateway. I will mess with the wrapper so I can get it with the network drive.

Thanks for your help!

Steve