Page 1 of 1

TFTP problem

Posted: Mon Dec 01, 2008 2:54 pm
by Willy
Hello,

I start some tests with tFTP. I started with the sample tftp.prg from the samples dir

Code: Select all

//----------------------------------------------------------------------------//

function Main()

   local oInternet := TInternet():New()
   local oFTP      := TFTP():New( "207.46.133.140", oInternet ) // Microsoft FTP
   local aFiles

   if ! Empty( oFTP:hFTP )
      aFiles = oFTP:Directory( "*.*" )
      AEval( aFiles, { | aFile | MsgInfo( aFile[ 1 ] ) } )
   else
      MsgAlert( "oFTP:hFTP is null" )
   endif

   oInternet:End()

   MsgInfo( "Done!" )

return nil
It does not work. It goes always to

Code: Select all

MsgAlert( "oFTP:hFTP is null" )
I did not find parameters for user and password.

Am I missing something.

Greetings,

Willy

Posted: Mon Dec 01, 2008 3:23 pm
by Antonio Linares
Willy,

Have you tried with "ftp.microsoft.com" instead of "207.46.133.140" ?

Posted: Mon Dec 01, 2008 3:43 pm
by Willy
No I tried with "ftp://Micro...."

Now with "ftp.Micro... it works.


Thanks Antonio.

Greetings,

Willy

Posted: Mon Dec 01, 2008 4:13 pm
by Willy
Hello,

I stil have some problems.

I can read a directory, but I can'nt copy file to and from the ftp.

So I look at the TFtpClient Class. But I do not find any samples for that class.

Is there a working example.

Greetings,

Willy

Posted: Fri Dec 05, 2008 2:33 pm
by Willy
Anybody ?