# How to get/put file using SFTP node

**URL:** <https://discourse.nodered.org/t/how-to-get-put-file-using-sftp-node/33628>\
**Category:** General\
**Created:** [1 October 2020 14:29 UTC](https://discourse.nodered.org/t/how-to-get-put-file-using-sftp-node/33628 "2020-10-01T14:29:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![minhhn0205](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/minhhn0205/32/29062_2.png) [@minhhn0205](https://discourse.nodered.org/u/minhhn0205)\
**Post date:** [1 October 2020 14:29 UTC](https://discourse.nodered.org/t/how-to-get-put-file-using-sftp-node/33628/1 "2020-10-01T14:29:27Z")

</div>

Hi,  
I have installed xampp as a file server.  
I used the **List** method of `SFTP` node to see the file and directory information at **Remote Path** :

![sftp-node](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/b/dbcd5aafa25e3026c47c3f87f52ce73c6f4c7bf0.png)

In the **Method** list of this node, there are many other methods such as _Get_, _Put_, ...

![sftp-node-1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/2/0/20933bd5aabe1fc2cd6072d963fa8aaa97b159c5.png)

I have investigated and tried config but don't work:

 ![sftp-node-2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/d/7d244ad2e466b40a007cf61d1754d56958c3b7e6.png)

```auto
[{"id":"e9c2550a.80a8c8","type":"tab","label":"Get/Put using SFTP","disabled":false,"info":""},{"id":"f3f32b35.475718","type":"inject","z":"e9c2550a.80a8c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":190,"y":180,"wires":[["f14e96bb.8d2bc8"]]},{"id":"5f02d6d6.973f98","type":"debug","z":"e9c2550a.80a8c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":870,"y":180,"wires":[]},{"id":"f14e96bb.8d2bc8","type":"SFTP-main","z":"e9c2550a.80a8c8","path":"/","method":"get","remoteFilePath":"/xampp/htdocs/applications.html","localFilePath":"/Temp/AAA","remoteDestPath":"/","useCompression":"","encoding":"utf8","mode":"","recursive":"false","server":"e800b82d.2c5468","x":350,"y":180,"wires":[["4f38a4ba.ba46cc","153e0b73.d3bcb5"]]},{"id":"e372849a.99b548","type":"file","z":"e9c2550a.80a8c8","name":"","filename":"","appendNewline":true,"createDir":true,"overwriteFile":"true","encoding":"none","x":730,"y":180,"wires":[["5f02d6d6.973f98"]]},{"id":"4f38a4ba.ba46cc","type":"debug","z":"e9c2550a.80a8c8","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":480,"y":120,"wires":[]},{"id":"153e0b73.d3bcb5","type":"change","z":"e9c2550a.80a8c8","name":"","rules":[{"t":"set","p":"filename","pt":"msg","to":"payload.path","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":550,"y":180,"wires":[["e372849a.99b548","6fa51884.744708"]]},{"id":"3b6af2c3.9d751e","type":"comment","z":"e9c2550a.80a8c8","name":"Get","info":"","x":350,"y":140,"wires":[]},{"id":"6fa51884.744708","type":"debug","z":"e9c2550a.80a8c8","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":720,"y":120,"wires":[]},{"id":"6986aa7b.294dd4","type":"inject","z":"e9c2550a.80a8c8","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"str","x":190,"y":360,"wires":[["298c8460.34decc"]]},{"id":"298c8460.34decc","type":"SFTP-main","z":"e9c2550a.80a8c8","path":"/","method":"put","remoteFilePath":"/xampp/htdocs/","localFilePath":"/Temp/Data/","remoteDestPath":"/","useCompression":"","encoding":"utf8","mode":"","recursive":"false","server":"e800b82d.2c5468","x":350,"y":360,"wires":[["b0a18be1.a66a08"]]},{"id":"b0a18be1.a66a08","type":"debug","z":"e9c2550a.80a8c8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":510,"y":360,"wires":[]},{"id":"65c833f.dd23ecc","type":"comment","z":"e9c2550a.80a8c8","name":"Put","info":"","x":350,"y":320,"wires":[]},{"id":"e800b82d.2c5468","type":"SFTP-credentials","z":"","host":"127.0.0.1","port":"22","username":"admin","password":"20160605"}]

```

If you know how to use _Get_, _Put_ method of this node please let me know.  
Thanks!

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [1 October 2020 14:57 UTC](https://discourse.nodered.org/t/how-to-get-put-file-using-sftp-node/33628/2 "2020-10-01T14:57:54Z")

</div>

as its an SFTP node I would google the generic command line sftp command and read up on that first.

---

<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:** [30 November 2020 14:57 UTC](https://discourse.nodered.org/t/how-to-get-put-file-using-sftp-node/33628/3 "2020-11-30T14:57:57Z")

</div>

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