Hi,
We use the FTPclient function to send files on a ftp server.
For the being time we succeed to send the files on homepage:
Const FTPServerAddress = "ftp.name.fr"
But we want to send the files on a subdirectory.
We try this but it doesn't works:
Const FTPServerAddress = "ftp.name.fr/data/"
Anybody have an idea?
Regards,
Firmin
I believe that the path on the destination server is governed by the RemotePath argument to the FTPClient() instruction.. The first argument must be either an IP address or DNS name and it is not a URL.
You have to put the subdirectory in the RemoteFileName option, so, you have to leave IPAddress as is, and move the subdir to the other variable.
I should be something like
IPAddress : ftp.name.fr
RemoteFileName : "data/your_destination_file"
I do so for my datas, and it works fine.
I also tried with "/data/your_destination_file" and it works also.
Do you have to rename the subdirectory when you do this?
* Last updated by: Admin on 7/21/2014 @ 11:56 AM *
Hello,
Your directories' tree have to pre-exist because FPTClient isn't able to create a subdirectory.
But you can use the name you want for your subdir.
I used "data" here as an example for the answer to the opening thread, but it can be whatever you want.