# FTP windows issues

**URL:** https://discourse.nodered.org/t/ftp-windows-issues/69745
**Category:** General
**Created:** [28 October 2022 18:02 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745 "2022-10-28T18:02:38Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![ecombs](https://avatars.discourse-cdn.com/v4/letter/e/43a26b/32.png) [@ecombs](https://discourse.nodered.org/u/ecombs)
#### Post date: [28 October 2022 18:02 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/1 "2022-10-28T18:02:38Z")

</div>

When trying to List, Send and Get using any of the ftp available to download. I can connect to the ftp server but if I'm using List for files I can't change the working directory. It gives me the same folder on the root / starting directory.  
When trying to use get it times out.  
Using the example from the advanced-ftp does the same thing as the others  
I've tried using  
**node-red-contrib-ftp**  
**node-red-contrib-advanced-ftp**

Any help would be appreciated.  
Windows 11  
node-red version 2.2.2

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 October 2022 18:23 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/2 "2022-10-28T18:23:17Z")

</div>

I never had much luck with any of the FTP nodes. I stopped using them and instead use the appropriate shell commands running in an exec node.

---

<div class="post-metadata">

### Author: ![ecombs](https://avatars.discourse-cdn.com/v4/letter/e/43a26b/32.png) [@ecombs](https://discourse.nodered.org/u/ecombs)
#### Post date: [28 October 2022 18:35 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/3 "2022-10-28T18:35:44Z")

</div>

How might that be done?

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [28 October 2022 19:01 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/4 "2022-10-28T19:01:09Z")

</div>

Use an exec node to run the command line FTP commands. I don't know what those are in Windows but I am sure Google will provide the answer.

---

<div class="post-metadata">

### Author: ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)
#### Post date: [28 October 2022 19:21 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/5 "2022-10-28T19:21:29Z")

</div>

Take a look at this link (I created for my IoT students) to transfer files to/from a remote FTPserver.  
It makes use of a Python script called via an EXEC node in Node-RED.

> [@Using FTP(S) to transfer files to/from a remote FTP server](https://discourse.nodered.org/t/using-ftp-s-to-transfer-files-to-from-a-remote-ftp-server/62735):
>
> Some of my IoT students have encountered problems trying to get some of the FTP (Node-RED) contrib nodes working. This may be due to the restrictions on the school network and/or the school's ISP. As an exercise I tried writing a couple of Python scripts to use the FTP\_TLS library to send and receive files between a Raspberry Pi and a remote FTP server. As shown below, the scripts are called from a Node-RED flow using an Exec node. [{"id":"678f819f147e416a"…

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [28 October 2022 20:18 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/6 "2022-10-28T20:18:34Z")

</div>

Depends what else you might have installed. But more recent versions of Windows 10 should have SSH installed and therefore you could use the SCP client that comes with it. This does pre-suppose that the remote end has SSH rather than a pure FTP service installed.

Ah, just discovered that my version of Windows actually also has FTP installed - couldn't say whether that is true of all versions of windows though or whether I installed something that includes it at some point.

A note: I assume that you are aware that you should NEVER be using FTP on any system that is Internet accessible.

---

<div class="post-metadata">

### Author: ![ecombs](https://avatars.discourse-cdn.com/v4/letter/e/43a26b/32.png) [@ecombs](https://discourse.nodered.org/u/ecombs)
#### Post date: [2 November 2022 20:25 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/7 "2022-11-02T20:25:46Z")

</div>

@Colin  
I tried using the exec the only thing I'm able to do with the exec node is login with a script I created. I can't get it to send the file that is generated or even a local file. I added an example below.

```auto
[{"id":"1a0af27c98972ded","type":"tab","label":"Flow 4","disabled":false,"info":"","env":[]},{"id":"e2e8ea3dedd31583","type":"debug","z":"1a0af27c98972ded","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":846,"y":182,"wires":[]},{"id":"ad51c3d49b418c4f","type":"exec","z":"1a0af27c98972ded","command":"","addpay":"payload","append":"","useSpawn":"true","timer":"10","winHide":false,"oldrc":false,"name":"","x":686,"y":222,"wires":[["e2e8ea3dedd31583"],["7d881bc0eb5753d6"],["cdeee90cd7ab2b36"]]},{"id":"7d881bc0eb5753d6","type":"debug","z":"1a0af27c98972ded","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":846,"y":222,"wires":[]},{"id":"cdeee90cd7ab2b36","type":"debug","z":"1a0af27c98972ded","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":846,"y":262,"wires":[]},{"id":"2657fa74e1dd43f3","type":"function","z":"1a0af27c98972ded","name":"put file","func":"\n\ninsert = \"put C:/EDI/810/703354_20221021.txt 703354_20221021.txt\"\nmsg.payload = insert\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":240,"wires":[["ad51c3d49b418c4f"]]},{"id":"c142a8fa94a0ffcf","type":"inject","z":"1a0af27c98972ded","name":"Send Default Operation","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":240,"wires":[["2657fa74e1dd43f3"]]},{"id":"0dced579041eea1e","type":"function","z":"1a0af27c98972ded","name":"login","func":"\n\ninsert = \" ftp -n -s:ftp_script.txt\"\nmsg.payload = insert\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":200,"wires":[["ad51c3d49b418c4f"]]},{"id":"f8a85d1ad1c41d31","type":"inject","z":"1a0af27c98972ded","name":"Send Default Operation","props":[{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","x":340,"y":200,"wires":[["0dced579041eea1e"]]}]

```

@dynamicdave  
I'm on windows and I'd rather not run a python script just to send files when ftp is already built into windows. This program will be ported to a docker container so I would like there to be less complications to the program if possible

---

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [2 November 2022 21:17 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/8 "2022-11-02T21:17:56Z")

</div>

You can't do it like that, you have to do the login and the send in one go. I don't use windows, but this looks like it might help. [Using Windows FTP Scripts To Automate File Transfers | JSCAPE](https://www.jscape.com/blog/using-windows-ftp-scripts-to-automate-file-transfers)

---

<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: [1 January 2023 21:18 UTC](https://discourse.nodered.org/t/ftp-windows-issues/69745/9 "2023-01-01T21:18:43Z")

</div>

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