TFTP problem

Post Reply
Willy
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

TFTP problem

Post 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
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Post by Antonio Linares »

Willy,

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

Antonio Linares
www.fivetechsoft.com
Willy
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Post by Willy »

No I tried with "ftp://Micro...."

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


Thanks Antonio.

Greetings,

Willy
Willy
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Post 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
Willy
Posts: 117
Joined: Thu Mar 02, 2006 11:06 am
Location: Belgium

Post by Willy »

Anybody ?
Post Reply