# Shutil.copyfile

**URL:** <https://forum.inductiveautomation.com/t/shutil-copyfile/68224>\
**Category:** Ignition\
**Created:** [January 4, 2023, 4:32pm UTC](https://forum.inductiveautomation.com/t/shutil-copyfile/68224 "2023-01-04T16:32:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bharadwaj\_G](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Bharadwaj\_G](https://forum.inductiveautomation.com/u/Bharadwaj_G)\
**Post date:** [January 4, 2023, 4:32pm UTC](https://forum.inductiveautomation.com/t/shutil-copyfile/68224/1 "2023-01-04T16:32:05Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kcollins](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kcollins/32/19646_2.png) [@kcollins](https://forum.inductiveautomation.com/u/kcollins)\
**Post date:** [January 4, 2023, 4:50pm UTC](https://forum.inductiveautomation.com/t/shutil-copyfile/68224/2 "2023-01-04T16:50:25Z")

</div>

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).

---

<div class="post-metadata">

**Author:** ![Bharadwaj\_G](https://avatars.discourse-cdn.com/v4/letter/b/ecb155/32.png) [@Bharadwaj\_G](https://forum.inductiveautomation.com/u/Bharadwaj_G)\
**Post date:** [January 4, 2023, 5:12pm UTC](https://forum.inductiveautomation.com/t/shutil-copyfile/68224/3 "2023-01-04T17:12:27Z")

</div>

Sorry, it's perspective application...
