TFTP problem

TFTP problem

Postby Willy » Mon Dec 01, 2008 2:54 pm

Hello,

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

Code: Select all  Expand view
//----------------------------------------------------------------------------//

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  Expand view
MsgAlert( "oFTP:hFTP is null" )


I did not find parameters for user and password.

Am I missing something.

Greetings,

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

Postby Antonio Linares » Mon Dec 01, 2008 3:23 pm

Willy,

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

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42080
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Postby Willy » Mon Dec 01, 2008 3:43 pm

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

Postby Willy » Mon Dec 01, 2008 4:13 pm

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

Postby Willy » Fri Dec 05, 2008 2:33 pm

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


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 102 guests