|Posted by:||Karl (no_email.no_place.home)|
|Date:||Thu, 25 Sep 2003|
My understanding is that the FTP components are blocking, which means you
shouldn't need to use events, try something as simple as this:
I don't know if HTML tags work here, but i'll try anyway :)
void TForm1::transferPatch(const std::string &inFilename)
AnsiString filename = inFilename.c_str();
// Connect to the FTP server.
FTP->Host = "yourhost.com";
FTP->Username = "username";
FTP->Password = "password";
// transfer file
FTP->TransferType = ftBinary;
FTP->Put("sourceFileName", DestFileName, false);
Or have I missed the point..
On Tue, 16 Sep 2003 14:45:39 -0600, Dan <da…@thesourceintl.com> wrote:
> I am trying to have my app login to the ftp server, then change to the
> appropriate directory than transfer files all without any user
> I have found the only event that occurs when after the user logs in, is
> onafterClientLogin event. When I try to changedir() within the event, I
> the error "unable to build data connection, no route to host".
> If I cannot perform this action here, where should I do it?
> I tried to use the onstatus event and check for a connected status (which
> occurs but prior to logging in apparently) so I was not able to changeDir
> there either.
Using M2, Opera's revolutionary e-mail client:http://www.opera.com/m2/
OnAfterClientLogin posted by Dan on Tue, 16 Sep 2003