# Gateway Event Scripts File Location

**URL:** <https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559>\
**Category:** Ignition\
**Tags:** ignition81, scripting\
**Created:** [January 31, 2022, 4:49pm UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559 "2022-01-31T16:49:27Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![besaliealprince](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@besaliealprince](https://forum.inductiveautomation.com/u/besaliealprince)\
**Post date:** [January 31, 2022, 4:49pm UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559/1 "2022-01-31T16:49:27Z")

</div>

Where in Windows OS File system does the gateway event script get stored ?  
Trying to use git version control on the scripts which I have under gateway events. What would be the best method to do this ?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 31, 2022, 4:50pm UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559/2 "2022-01-31T16:50:23Z")

</div>

Gateway Event Scripts are currently stored in an opaque binary resource that you won’t have any luck version controlling.

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 31, 2022, 4:52pm UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559/3 "2022-01-31T16:52:13Z")

</div>

It will be in the `$IGNITION/data/projects/$PROJECT/ignition/event-scripts` folders, though.

---

<div class="post-metadata">

**Author:** ![besaliealprince](https://avatars.discourse-cdn.com/v4/letter/b/0ea827/32.png) [@besaliealprince](https://forum.inductiveautomation.com/u/besaliealprince)\
**Post date:** [January 31, 2022, 11:05pm UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559/4 "2022-01-31T23:05:14Z")

</div>

Are there APIs to enable and disable the gateway tag change event scripts besides doing it manually in the designer ?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [January 31, 2022, 11:07pm UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559/5 "2022-01-31T23:07:32Z")

</div>

No.

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [February 1, 2022, 1:50pm UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559/6 "2022-02-01T13:50:33Z")

</div>

If you want to version control your gateway event scripts, put them in a script library and call them from your gateway event script. The Script library gets stored as plaintext python and that is much more suitable for version control. My gateway event scripts really only check the conditions to see if its the right time to run the script, but then I call my script library.

```auto
theConditionIsRight = someTagOrDatabaseInformation
if theConditionIsRight:
    myScriptLibrary.doStuff()

```

Your projects script library for windows if you did a regular install is `C:\Program Files\Inductive Automation\Igniton\data\projects\YOUR PROJECT NAME HERE\ignition\script-python` - you can check it out and see that your scripts are there in plain text - much better for git.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 1, 2022, 2:32pm UTC](https://forum.inductiveautomation.com/t/gateway-event-scripts-file-location/55559/7 "2022-02-01T14:32:04Z")

</div>

> [@bkarabinchak.psi](#):
>
> only check the conditions to see if its the right time to run the script, but then I call my script library

I recommend not even doing that. Just hand off to the project script. Project scripts can cache values to help make conditional decisions, and can maintain other top level variables, like a logger instance.
