Hi, i use aFiles = oFTP:Directory( "." ) to list all files in a ftp, but i want to change the folder before do this, how?
Thanks.
Hi, i use aFiles = oFTP:Directory( "." ) to list all files in a ftp, but i want to change the folder before do this, how?
Thanks.
oFtp:SetCurrentDirectory( cDirName )oFtp:Directory("/myDir/MyFiles/*.*")Thanks Anser, but i have a big problem, i use this to connect a ftp:
oInternet := TInternet():New()
oFTP := TFTP():New( "ftp.orgfree.com", oInternet, "user", "passw" )
IF Empty( oFtp:hFtp)
MsgAlert("Não foi possÃvel conectar ao FTP","Atenção")
Return .f.
Endif
aFiles = oFTP:Directory( "." )
In some customers runs fine and aFiles returns all files in ftp, others customers aFiles returns empty, i can't see the problem.
Can you help me?
Thanks in advance.
Wanderson
As Anser suggested, you need to specify the complete path for the directory
oFtp:Directory("/myDir/MyFiles/.")
Some servers are Linux, others are windows and they will not respond without the complete path
Hth
Richard
Wanderson
I have a same problem, the problem is "FTP Passive Mode", this mode not return list
Yo tengo el mismo problema con algunos FTPs y es porque estos necesitan conectarse con "Passive mode" y este modo no retorna nada cuando usamos "oFTP:Directory", por ahi creo que esta el problema
Richard Chidiak wrote:Wanderson
As Anser suggested, you need to specify the complete path for the directory
oFtp:Directory("/myDir/MyFiles/*.*")
Some servers are Linux, others are windows and they will not respond without the complete path
Hth
Richard