what’s the best way to send a file with FTP?


If you are in production you should be using ftps or sftp, in which case the Chilkat Extensions (FTP, which includes FTPS, and SFTP) are what we use.

Unprotected FTP servers will be probed within 30 seconds of being put up, from what I’ve seen on our servers.

If you need a protected FTP Server, you can monkey around with IIS and waste many hours, or you can get Cerberus, which is easy to use and just keeps working.

the Chilkat Extensions are from, by subscription. They are available (for one price) for just about every platform. In addition to the FTP/S and SFTP controls, we use their email, zip, and http and Crypt controls. The http control is used from our VFP-based app to hit a Lianja web service, for example.

You can find “free” versions of controls that do most of the same stuff. The difference is in having control of all the features you need to match what your customers are using, and in the fantastic support (as good as Barry’s, almost as fast <s>). Also, many of the common usages have been “conceptualized” into an easy-to-use command that makes complex tasks easy. I’ve saved a couple of projects and hundreds of hours since I started using them for, I think, the past 10 years or so.

In one case we needed FTPS before it was common (we were working with a casino, with enhanced security needs). I wrote Matt at Chlkat explaining our need. He said if I’d set up a server he’d write it. We did, and he did, just like that.






oRequest.putFile("'myUserName'&password='myPassword' ",xmlName)

You can however only use http:// or https:// not ftp:// with “NetworkRequest”
If you want to upload using sftp i would recommend that you look at using the chilkat components for Lianja from

I would like to have the targetFile and source file both coming from variables.
It works Ok with source file as xmlName where xmlName contains something like “C:\Lianja\Data\timeline\9-11.XML”.
But targetFile resists my attempts to use a variable. I would like to pass through a file name and a subdirectory on my Host.
So TargetFile would be something like “/DataXML/filename.xml”.
You can substitute variables into strings using &varname. which would let you use variables. Otherwise you can just create the character variable and use that as an argument to the method call.
Try omitting the / from the start of the target file. Does that directory already exist and if so does it have the correct permissions.
it may be that the target can only be a filename.
One solution would be to have a username that when logged in uses a different directory on the ftp server but that would require some configuration and is Server dependent.