# Script to get Ignition data folder path

**URL:** <https://forum.inductiveautomation.com/t/script-to-get-ignition-data-folder-path/37648>\
**Category:** Ignition\
**Tags:** ignition80, perspective\
**Created:** [August 12, 2020, 1:51pm UTC](https://forum.inductiveautomation.com/t/script-to-get-ignition-data-folder-path/37648 "2020-08-12T13:51:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![luc.martin](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@luc.martin](https://forum.inductiveautomation.com/u/luc.martin)\
**Post date:** [August 12, 2020, 1:51pm UTC](https://forum.inductiveautomation.com/t/script-to-get-ignition-data-folder-path/37648/1 "2020-08-12T13:51:40Z")

</div>

Is there a script or a way to know where the data folder is installed on the server?

I have to get browse the perspective views folder and I search a way to get where it is.

---

<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 12, 2020, 3:36pm UTC](https://forum.inductiveautomation.com/t/script-to-get-ignition-data-folder-path/37648/2 "2020-08-12T15:36:13Z")

</div>

You need access to the gateway context, which isn’t trivial if you’re not in a custom module. There’s some examples on this forum - it’s technically an “unsupported” technique, since accessing the gateway context also gives you access to irrevocably break your gateway if you do something bad.  
From the [`GatewayContext`](http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.14/com/inductiveautomation/ignition/gateway/model/GatewayContext.html), you need to get the [`SystemManager`](http://files.inductiveautomation.com/sdk/javadoc/ignition80/8.0.14/com/inductiveautomation/ignition/gateway/system/SystemManager.html), via the appropriately named getter. From there, there’s a simple `getDataDir()` function.
