Hi guys,
I have a script I run from the script console that reads a file from "C:\Users\user\AppData\Roaming\Inductive Automation\Designer Launcher" just by passing the file name like "read_json_file("file_name.json")".
The problem is that I want to run this script from a gateway event daily, so I need to move the file to the gateway in "C." I would like to know how to pass the path "C:file_name.json" to the gateway event.
the script is
def read_json_file(file_name):
try:
with open(file_name) as json_file:
return json.load(json_file)
except IOError:
print("Error: JSON file not found!")
return None