FTP windows issues

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

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.

How might that be done?

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.

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.

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.

@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.

[{"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

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

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