# Create files in Pydio file structure

**URL:** https://forum.pydio.com/t/create-files-in-pydio-file-structure/1852
**Category:** Pydio 8
**Tags:** linux
**Created:** [November 15, 2018, 4:42pm UTC](https://forum.pydio.com/t/create-files-in-pydio-file-structure/1852 "2018-11-15T16:42:10Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![epeterson-ext](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@epeterson-ext](https://forum.pydio.com/u/epeterson-ext)
#### Post date: [November 15, 2018, 4:42pm UTC](https://forum.pydio.com/t/create-files-in-pydio-file-structure/1852/1 "2018-11-15T16:42:10Z")

</div>

I have processes that create files directly inside the Pydio folder structure and does not use APIs to move files. What are the consequences of doing this? Is everything going to break?

I’m working with what I assume is an enterprise distribution of Pydio running on CentOS 6.6

---

<div class="post-metadata">

### Author: ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)
#### Post date: [November 16, 2018, 9:35am UTC](https://forum.pydio.com/t/create-files-in-pydio-file-structure/1852/2 "2018-11-16T09:35:10Z")

</div>

Hi,  
it will not be an issue as long as you trigger the sync datasource job everytime you add datas(so that they get indexed),  
for instance here’s a shell script that will sync a datasource

```auto
#!/bin/bash

dsName=<datasource where you put your datas>

# Defaults, adapt to your instance
clientKey=cells-front
clientSecret=<secret key found in pydio.json>
username=<user>
password=<password>
nonce=nonce

publicURL=http://localhost

# for the authorization header the username and password needs to be base64
authToken=$(echo -n "$clientKey:$clientSecret" | base64)

params="grant_type=password&username=$username&password=$password&scope=email%20profile%20pydio%20offline&nonce=$nonce"

# needs jq installed to parse the bearer token, for instance apt install jq
idToken=$(curl -s -X POST $publicURL/auth/dex/token \
	    -H "Content-Type: application/x-www-form-urlencoded" \
	    -H "Authorization:Basic $authToken" \
	    -d "$params" | jq -r .id_token)

# launch the sync datasource job
curl -X PUT \
 $publicURL/a/jobs/user/datasource-resync \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $idToken" \
  -H "Content-Type: application/json" \
  -d '{"JobName":"datasource-resync","JsonParameters":"{\"dsName\":\"$dsName\"}"}'

```

---

<div class="post-metadata">

### Author: ![epeterson-ext](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@epeterson-ext](https://forum.pydio.com/u/epeterson-ext)
#### Post date: [November 17, 2018, 8:57pm UTC](https://forum.pydio.com/t/create-files-in-pydio-file-structure/1852/3 "2018-11-17T20:57:02Z")

</div>

Thanks, Zayn!  
Is there anything done in Pydio itself that triggers a sync similar to this script?

Eric

---

<div class="post-metadata">

### Author: ![zayn](https://avatars.discourse-cdn.com/v4/letter/z/a87d85/32.png) [@zayn](https://forum.pydio.com/u/zayn)
#### Post date: [November 19, 2018, 8:24am UTC](https://forum.pydio.com/t/create-files-in-pydio-file-structure/1852/4 "2018-11-19T08:24:19Z")

</div>

Hi,  
in the interface in datasrouces, you can press this button,

 ![05](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/1X/092b4c088e3f7f4ea29e3eed47409e5dcca1844b.png)

edit:1

---

<div class="post-metadata">

### Author: ![epeterson-ext](https://avatars.discourse-cdn.com/v4/letter/e/d2c977/32.png) [@epeterson-ext](https://forum.pydio.com/u/epeterson-ext)
#### Post date: [November 21, 2018, 1:05pm UTC](https://forum.pydio.com/t/create-files-in-pydio-file-structure/1852/5 "2018-11-21T13:05:33Z")

</div>

Thanks, zayn! You’re the best 🙂
