# Dropbox Node Direct Folder Issue

**URL:** <https://discourse.nodered.org/t/dropbox-node-direct-folder-issue/47188>\
**Category:** General\
**Created:** [15 June 2021 15:58 UTC](https://discourse.nodered.org/t/dropbox-node-direct-folder-issue/47188 "2021-06-15T15:58:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![edwardr](https://avatars.discourse-cdn.com/v4/letter/e/e0b2c6/32.png) [@edwardr](https://discourse.nodered.org/u/edwardr)\
**Post date:** [15 June 2021 15:58 UTC](https://discourse.nodered.org/t/dropbox-node-direct-folder-issue/47188/1 "2021-06-15T15:58:53Z")

</div>

Hello Folks,

I am currently using the Dropbox node to upload txt files to my dropbox. The issue is the node only uploads the documents to my dropbox and not a specific folder within it. Is there a method or setting in the dropbox node to be able to direct the upload to a specific folder at all?

Thank you,

E

---

<div class="post-metadata">

**Author:** ![Jean-Luc](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jean-luc/32/89996_2.png) [@Jean-Luc](https://discourse.nodered.org/u/Jean-Luc)\
**Post date:** [15 June 2021 19:17 UTC](https://discourse.nodered.org/t/dropbox-node-direct-folder-issue/47188/2 "2021-06-15T19:17:39Z")

</div>

Hello edwardr,

you can do it with this exemple flow.  
Don't forget first to define the variable "Backup-user-name" with a text node for example.  
And launch the backup with the inject

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a6eceec2e12749815d2a0af7bdd1b293540acdc9.png)

```auto
[{"id":"13c154f6.33f9db","type":"function","z":"aad530d6.afa61","name":"Read filenames","func":"var nom = global.get(\"Backup-nom-utilisateur\");\nvar path = ('/home/pi/Pictures/');\nvar fs = (global.get('fse'));\n\nfs.readdirSync(path).forEach(file => {\n//node.send({localFilename: \"/home/pi/Pictures/\"+(file), filename: 'Dir/subdir/'+(file)});\nvar file_dest = \"Clients/\" + nom +\"/\" + file\nnode.send({localFilename: \"/home/pi/Pictures/\"+(file), filename: (file_dest)});\n});\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":380,"y":1060,"wires":[["b2fd551.7986da8"]]},{"id":"b2fd551.7986da8","type":"dropbox out","z":"aad530d6.afa61","dropbox":"","filename":"","localFilename":"","name":"","x":560,"y":1060,"wires":[]},{"id":"dbb65ca8.f0a5e","type":"inject","z":"aad530d6.afa61","name":"backup","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":210,"y":1060,"wires":[["13c154f6.33f9db"]]}]

```

And in Dropbox, it should have this kind of result. The final directory has been defined as "docker" under /Clients directory.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/d/2d4d0c6061be5eea90166c4989705c752b80a5a7.png)

This is what was to be saved

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/b/3b77eea05a1f8b292643e19cf28fd8c6c1fa6cf0.png)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [7 July 2021 15:06 UTC](https://discourse.nodered.org/t/dropbox-node-direct-folder-issue/47188/3 "2021-07-07T15:06:55Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
