[Gambas-user] Using FTPClient
Adrien Hernot
amh at ...859...
Sun Feb 20 22:39:04 CET 2005
Hi!
I have been trying to use FTP client from inside Gambas to get my FTP account listing and to upload some files to it, but without full success.
The autentification always work, but the data transfer happens only 1 out of 10 times and otherwise fails with a status of -1007 (Connection refused).
Using ncftp to connect to my site and show th elisting always work, so it is probably not a network problem.
Can someone help me with that issue? I included part of my code at the bottom.
Adrien
FtpClient1 = NEW FtpClient
FtpClient1.User = "dsl54234"
FtpClient1.Password = ....
FtpClient1.URL = "ftp://users.cybercity.dk/"
FtpClient1.Get( )
DO WHILE FtpClient1.Status >0
PRINT "waiting... (status = " & FtpClient1.Status & ")"
WAIT (0.1)
LOOP
IF FtpClient1.Status < 0 THEN
PRINT "Failed... (status = " & FtpClient1.Status & ")"
Message("Error " & FtpClient1.Status)
RETURN
END IF
READ #FtpClient1,sCad,Lof(FtpClient1)
PRINT "dir returned: " & sCad
More information about the User
mailing list