Mapped drive file move script not working

I am trying to use a tag change script in Ignition to move files on a mapped drive. When using local C drive the script works, but when using the mapped drive on the NAS it is no longer working.

Here is the code I am using in my tag change script:

Ignition version: 7.6.7


import os, shutil, errno
import datetime as dt

date = dt.datetime.today().strftime("%m_%d_%Y")
print(date)

os.chdir('Z:\\testloc\dest1')
cwd = os.getcwd()
print(cwd)

checkpath = os.path.join(cwd,date)
print(checkpath)

if not os.path.exists(checkpath):
    os.mkdir(date)
    source = "Z:\\testloc\source1"
    print(source)
    names = os.listdir(source)
    print(names)
    destination = (checkpath)
    print(destination)
for name in names:
    srcname = os.path.join(source,name)
    print(srcname)
    dstname = os.path.join(destination,name)
    print(dstname)
    shutil.move(srcname,dstname)
else:
    source = "Z:\\testloc\source1"
    print(source)
    names = os.listdir(source)
    print(names)
    destination = (checkpath)
    print(destination)
for name in names:
    srcname = os.path.join(source,name)
    print(srcname)
    dstname = os.path.join(destination,name)
    print(dstname)
    shutil.move(srcname,dstname)

Try using the fully qualified share instead of the drive letter.

//serverName/shareName/path/to/folder

Made the following changes and script works in Visual Studio but not in Ignition. The console is not showing me any error logs either, I’m not sure that it is the correct one. I read there were changes that needed to be made to the wrapper or configuration file for Ignition but the posts were vague as to whether they were successful or not.

import os, shutil, errno
import datetime as dt

date = dt.datetime.today().strftime("%m_%d_%Y")
print(date)

os.chdir('//EngDevNAS/testloc/dest1')
cwd = os.getcwd()
print(cwd)

checkpath = os.path.join(cwd,date)
print(checkpath)

if not os.path.exists(checkpath):
    os.mkdir(date)
    source = "//EngDevNAS/testloc/source1"
    print(source)
    names = os.listdir(source)
    print(names)
    destination = (checkpath)
    print(destination)

    for name in names:
        srcname = os.path.join(source,name)
        print(srcname)
        dstname = os.path.join(destination,name)
        print(dstname)
        shutil.move(srcname,dstname)

else:
    source = "//EngDevNAS/testloc/source1"
    print(source)
    names = os.listdir(source)
    print(names)
    destination = (checkpath)
    print(destination)

    for name in names:
        srcname = os.path.join(source,name)
        print(srcname)
        dstname = os.path.join(destination,name)
        print(dstname)
        shutil.move(srcname,dstname)

They are necessary, so if you haven't done that yet start there.