Ver Mensaje Individual
  #15  
Antiguo 01-05-2014
ronald_tro ronald_tro is offline
Miembro
 
Registrado: feb 2009
Posts: 53
Reputación: 16
ronald_tro Va por buen camino
Bueno lo he resuelto pero de diferente forma, hice una función como esta
Código Delphi [-]
function download(texto : string): Integer;
var
  valor: Integer;
begin
    valor:= 0;
    if (Copy(texto, 1, 1) = 'm') and (Copy(texto, Length(texto) - 2, 3) = 'txt') then
    begin
        valor:= 1
    end;
    Result := valor;
end;

Después lo que hice es esto, en el botón de descargar
Código Delphi [-]
var
I: integer;
Lista : tStringList;
begin
 for i:= 0 to FTP.DirectoryListing.Count-1 do
begin

    if download(FTP.DirectoryListing[i].FileName) = 1 then
            begin
                  FTP.Get(FTP.DirectoryListing[i].FileName, 'C:\descargas\' + FTP.DirectoryListing[i].FileName );
                     end;


    end;


end;

Y listo, funciona, aunque no encontré de la otra forma, espero que a alguien le sirva

Última edición por ronald_tro fecha: 01-05-2014 a las 18:02:15.
Responder Con Cita