Ver Mensaje Individual
  #2  
Antiguo 19-08-2008
Neeruu Neeruu is offline
Miembro
 
Registrado: oct 2007
Posts: 512
Reputación: 19
Neeruu Va por buen camino
Cool error con idFTP

Código Delphi [-]
procedure ListarDirectorio(Sender :TObject);
var MysList:TStringList;
iLines, iPesoArchivo:Integer;
sDir:String;
begin
  //Carga en una ListBox las Capetas y en Otra Los Archivos
  MysList := TStringList.Create;
  With FrmMain do
    begin
      ListBoxDir.Items.Clear;
      ListBoxFile.Items.Clear;
      ftp.List(MysList,'',False
      EditCurrentDir.Text := ftp.RetrieveCurrentDir;
      For iLines := 0 to MysList.Count -1 do
        begin
          sDir         := MysList[iLines];
          iPesoArchivo := FTP.Size(sDir);
          if iPesoArchivo = -1 then // Carpetas
              ListBoxDir.Items.Add(sDir)
          else ListBoxFile.Items.Add(sDir); //Archivos
        end;
    end;
  //Otra Forma de Mostrar el Directorio del Ftp
  {MysList := TStringList.Create;
  With FrmMain do
    begin
      ftp.List(MysList,'',False);
      ListBoxDir.Lines.Clear;
      ListBoxDir.Lines.AddStrings(MysList);
    end;
  MysList.Free;}
end;

Hola aca pongo la forma que utilizo yo para listar carpetas y archivos!!!
Muestr las carpetas por un lado y los archivos por otro!!!


Fijate que puede servirte!!!

Saluda Atte Neeruu!!!

Cita:
Fijate que tu recuoperas los archivos de la siguiente manera: FTP.List(MysList,'*.*',False);

y yo lo hago haci : FTP.List(MysList,'',False);

Última edición por Neeruu fecha: 19-08-2008 a las 17:52:30.
Responder Con Cita