# Create new folder on the server

**URL:** <https://forum.inductiveautomation.com/t/create-new-folder-on-the-server/36628>\
**Category:** Ignition\
**Tags:** ignition80, vision, scripting\
**Created:** [July 13, 2020, 6:26am UTC](https://forum.inductiveautomation.com/t/create-new-folder-on-the-server/36628 "2020-07-13T06:26:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yifeiliu08](https://avatars.discourse-cdn.com/v4/letter/y/bbe5ce/32.png) [@yifeiliu08](https://forum.inductiveautomation.com/u/yifeiliu08)\
**Post date:** [July 13, 2020, 6:26am UTC](https://forum.inductiveautomation.com/t/create-new-folder-on-the-server/36628/1 "2020-07-13T06:26:20Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/8/08f7a22ae2e6323f187c622f9384216d192731f6.jpeg)  
i create a app for the propose to print the label, meanwhile i will system.print.printToImage to print the screen on my server, the server address is \192.168.17.9\Pictures\CureSheetPhoto\WareHouse\20200713141500.jpg  
due to everyday will have many pictures, i want to everyday to create a new folder  
i see the previous topic relate to this request:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/e/2e109348c1569d1b3665a40ccb659e9bfa61ca4e.png)  
i will success create a new folder on my computer’s desk  
but if i want to create them on the server, i will not able to see new folder, but if i want to try again, it will report fault that file alread exists.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0f017d7acbcca308a94b3f06a499fa11e7f97e22.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/6/56ece9d97a1b03e396501006a0791cbad4d4405d.png)  
how to create a folder on the server?

---

<div class="post-metadata">

**Author:** ![KMuldoon](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@KMuldoon](https://forum.inductiveautomation.com/u/KMuldoon)\
**Post date:** [July 13, 2020, 8:43pm UTC](https://forum.inductiveautomation.com/t/create-new-folder-on-the-server/36628/2 "2020-07-13T20:43:53Z")

</div>

When using backslashes to address a filepath, you’ll have to use another backslash to escape the backslash. So your example would change to:

```auto
import os, sys
DesPath="D:\\Payout2\\Jul 39"
DesPath2="\\\\192.168.17.9\\Pictures\\CureSheetPhoto\\WareHouse\\Jul29"
if (not os.path.exists(DesPath)):
	os.makedirs(DesPath)
if (not os.path.exists(DesPath2)):
	os.makedirs(DesPath2)

```

Edit: Changed the DesPath2 to correct the slashes prior to the IP

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [July 13, 2020, 8:47pm UTC](https://forum.inductiveautomation.com/t/create-new-folder-on-the-server/36628/3 "2020-07-13T20:47:43Z")

</div>

> [@KMuldoon](#):
>
> DesPath2="\192.168.17.9\Pictures\CureSheetPhoto\WareHouse\Jul29"

I think DesPath2 should look like this:

```auto
DesPath2="\\\\192.168.17.9\\Pictures\\CureSheetPhoto\\WareHouse\\Jul29"

```

---

<div class="post-metadata">

**Author:** ![KMuldoon](https://avatars.discourse-cdn.com/v4/letter/k/839c29/32.png) [@KMuldoon](https://forum.inductiveautomation.com/u/KMuldoon)\
**Post date:** [July 13, 2020, 8:51pm UTC](https://forum.inductiveautomation.com/t/create-new-folder-on-the-server/36628/4 "2020-07-13T20:51:42Z")

</div>

You’re right, thank you for the correction. I’ve corrected it above.
