The code below shows the files from the ftp. I would like an example of sending and receiving a file via ftp.
#include "FiveWin.ch"
//----------------------------------------------------------------------------//
function Main()
local oInternet := TInternet():New()
local oFTP := TFTP():New( "ftp.brturbo.com.br", oInternet,"usuariodemo","senha123" )
local aFiles
if ! Empty( oFTP:hFTP )
aFiles = oFTP:Directory( "*.*" )
AEval( aFiles, { | aFile | MsgInfo( aFile[ 1 ], aFile[ 3 ] ) } )
else
MsgAlert( "oFTP:hFTP is null" )
endif
oInternet:End()
MsgInfo( "Done!" )
return nilKleyton
Fwh906
Brazil
Fwh906
Brazil