Shutil.copyfile

Hi,

I need help on the shutil.copyfile, am trying to copy file from onprem server to my local system using shutil.copy file with below script

import shutil
import os

a=os.path.join('C:\MemorySnap\ThreadSnap','ignition_ThreadSnap_LTL_31122022165706')
des1 = os.path.join('C:\networkTest','ignition_ThreadSnap_LTL_31122022165706.json')

shutil.copyfile(a,des1)

its working fine with ignition script Console, when am trying to execute the same using Button Event Action performed Script, throwing IOError 2, NO such file directory found.

Is this in Perspective or Vision? Scope will matter here, as Perspective scripts run on the gateway (versus Script Console and/or Vision windows running locally).

Sorry, it's perspective application...