[Lazarus-es] Recorer archivos de una carpeta
Martin Gomez
mmgomez en gmail.com
Mie Ene 22 19:30:10 CET 2014
2014/1/22 Maxi <maximiliano.duarte en gmail.com>
> Busca de filesearch Ahora no tengo a mano para enviarte ejemplos desde el
> celular
Es algo así como FileFindFirst y FileFindNext, utilizando en el "next" la
estructura de búsqueda creada en el findfirst.
http://www.freepascal.org/docs-html/rtl/sysutils/findfirst.html
aqui el ejemplo de la web:
Program Example43;
{ This program demonstrates the FindFirst function }
Uses SysUtils;
Var Info : TSearchRec;
Count : Longint;
Begin
Count:=0;
If FindFirst ('*',faAnyFile and faDirectory,Info)=0 then
begin
Repeat
Inc(Count);
With Info do
begin
If (Attr and faDirectory) = faDirectory then
Write('Dir : ');
Writeln (Name:40,Size:15);
end;
Until FindNext(info)<>0;
end;
FindClose(Info);
Writeln ('Finished search. Found ',Count,' matches');
End.
Lo he utilizado muchas veces y funciona de maravillas.
--
Try not to become a man of success but rather to become a man of value. *Albert
Einstein*
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus-es/attachments/20140122/4e41bbe5/attachment-0002.html>
More information about the Lazarus-es
mailing list