# system.file.writeFile not working on Mac

**URL:** <https://forum.inductiveautomation.com/t/system-file-writefile-not-working-on-mac/109359>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [August 4, 2025, 11:38pm UTC](https://forum.inductiveautomation.com/t/system-file-writefile-not-working-on-mac/109359 "2025-08-04T23:38:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdixon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pdixon/32/6899_2.png) [@pdixon](https://forum.inductiveautomation.com/u/pdixon)\
**Post date:** [August 4, 2025, 11:38pm UTC](https://forum.inductiveautomation.com/t/system-file-writefile-not-working-on-mac/109359/1 "2025-08-04T23:38:38Z")

</div>

I have a Perspective script that creates a PDF with system.report.executeReport and then saves it to the device with system.perspective.download. This works, I see the PDF on my device where I expect it.

I now want to save the same PDF to the Downloads folder on my Gateway. My code is:

```python
GatewayPath = "~/Downloads/Gateway" + filename 
system.file.writeFile(GatewayPath , report_array)
logger.info("Confirm save PDF to gateway " + GatewayPath)

```

I see no error in code, it runs successfully and the logger shows up as expected. However, I do not see any PDF written on my Mac. What could be happening?

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [August 4, 2025, 11:40pm UTC](https://forum.inductiveautomation.com/t/system-file-writefile-not-working-on-mac/109359/2 "2025-08-04T23:40:29Z")

</div>

Try a fully qualified path, not the shortcut `~/Downloads`.

---

<div class="post-metadata">

**Author:** ![pdixon](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pdixon/32/6899_2.png) [@pdixon](https://forum.inductiveautomation.com/u/pdixon)\
**Post date:** [August 4, 2025, 11:52pm UTC](https://forum.inductiveautomation.com/t/system-file-writefile-not-working-on-mac/109359/3 "2025-08-04T23:52:07Z")

</div>

Thanks PGriffith, "/Users/{username}/Downloads" works!
