# How can you set up the gateway to make new folders?

**URL:** <https://forum.inductiveautomation.com/t/how-can-you-set-up-the-gateway-to-make-new-folders/25111>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [May 17, 2019, 6:52pm UTC](https://forum.inductiveautomation.com/t/how-can-you-set-up-the-gateway-to-make-new-folders/25111 "2019-05-17T18:52:11Z")\
**Posts on this page:** 4\
**Page:** 1

<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:** [May 17, 2019, 6:52pm UTC](https://forum.inductiveautomation.com/t/how-can-you-set-up-the-gateway-to-make-new-folders/25111/1 "2019-05-17T18:52:11Z")

</div>

I want to make it such that on a Gateway Tag Change, under certain conditions, I am going to make a folder with todays date and store a .csv file in it with some data. However right now I can’t even seem to get it to make a folder. Here’s the relevant part of my Gateway Tag Change Script

```auto
import os
saveDirectory = "C:\\Users\\Public\\Documents\\DataExport"
logger.info("1")
os.mkdirs(saveFileDirectory, exist_ok=True)				
logger.info("2")

```

but it never gets to 2. I am not sure whats wrong. I am using Ignition 7.9.9

---

<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:** [May 17, 2019, 7:14pm UTC](https://forum.inductiveautomation.com/t/how-can-you-set-up-the-gateway-to-make-new-folders/25111/2 "2019-05-17T19:14:18Z")

</div>

You probably need to make sure the `LOCAL SERVICE` Windows user has write permissions wherever you want to write to.

---

<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:** [May 17, 2019, 7:20pm UTC](https://forum.inductiveautomation.com/t/how-can-you-set-up-the-gateway-to-make-new-folders/25111/3 "2019-05-17T19:20:33Z")

</div>

I’m using Windows 10, where do I set those permissions?

---

<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:** [May 17, 2019, 10:34pm UTC](https://forum.inductiveautomation.com/t/how-can-you-set-up-the-gateway-to-make-new-folders/25111/4 "2019-05-17T22:34:58Z")

</div>

Right-click on a folder, Properties, Security tab?
