FTP - TO ENRICO
Posted: Wed Feb 25, 2015 6:53 pm
Please Enrico what I'm doing wrong?
In Portuguese: Enrico, o que estou fazendo errado?
Regards
In Portuguese: Enrico, o que estou fazendo errado?
Code: Select all | Expand
IF Len( aFiles ) > 0
oUrl := tUrl():New( cUrl )
oFTP := tIPClientFtp():New( oUrl, .T. )
oFTP:Open(cUrl)
cMyPath:="\teste"
oFTP:CWD( cMyPath ) // Enrico, Do not change the directory...
oFTP:nConnTimeout := 20000
oFTP:bUsePasv := .T.
IF oFTP:Open()=.f.
usooff="S"
MsgStop( "Nao conectou", "Atencao" )
RETURN .F.
endif
if oFTP:Cwd( cMyPath )=.f.
MsgStop( "Nao abriu pasta: "+cMyPath, "Atencao" ) // Do not change the directory..
//oFTP:MKD(cMyPath) // Cria o diretorio
//return .f.
endif
oFTP:Cwd(cMyPath)
oFTP:reset()
Regards