This procedure below will list all files in a directory and add it to stringlist. Here is the function :
procedure GetFilenames(Path: string; Dest: TStrings);
var
SR: TSearchRec;
begin
if FindFirst(Path+'*.*', faAnyFile, SR) = 0 then
repeat
Dest.Add(SR.Name);
until FindNext(SR) <> 0;
FindClose(SR);
end;
No comments:
Post a Comment