Ir al contenido


Foto

[TRUCO DELPHI] Leer el contenido de una Carpeta.


  • Por favor identifícate para responder
No hay respuestas en este tema

#1 sir.dev.a.lot

sir.dev.a.lot

    Advanced Member

  • Miembros
  • PipPipPip
  • 545 mensajes
  • Location127.0.0.1

Escrito 28 noviembre 2016 - 02:47

[TRUCO DELPHI] Leer el contenido de una Carpeta.


delphi
  1. procedure FindAll (const Path: String;
  2. Attr: Integer;
  3. List: TStrings);
  4. var
  5. Res: TSearchRec;
  6. EOFound: Boolean;
  7. begin
  8. EOFound:= False;
  9. if FindFirst(Path, Attr, Res) < 0 then
  10. exit
  11. else
  12. while not EOFound do begin
  13. List.Add(Res.Name);
  14. EOFound:= FindNext(Res) <> 0;
  15. end;
  16. FindClose(Res);
  17. end;

Saludos!


  • 1




IP.Board spam blocked by CleanTalk.