I have Ignition version 8.1.21 on both edge and main Ignition server.
I want to copy files from the E drive on the main Ignition server to the C drive (with same folder structure) on the PC with Ignition Edge. I have tried several things and haven't been able to get it to work.
I tried this on the edge project in the project library and also in the gateway event script.
import shutil
import os
filename = system.tag.readBlocking(['[edgeServer]ENT/LOC/Area/filename'])[0].value
driveSource = '\\\\10.10.10.10' #IP address of the main Ignition server
path = '\\Recipes\\' + filename + '.csv'
source = driveSource + path
netAuth = "net use \\\\10.10.10.10\\Recipes /user:username password"
driveDest = 'C:' #C drive on the edge server
destination = driveDest + path
move = shutil.copyfile(source, destination)
If I run this from the Main Server in the script console and change the main server driveSource to E: and the driveDest to the ip address of the edge server, I get permission denied. This is because the network permissions are set up one way (for security). What am I missing? I need the script to run on the edge server and copy from the main server to the edge.