procedure ListeDir(Path: string; FileList: TStrings);
var
SR: TSearchRec;
begin
if FindFirst(Path + '*.*', faAnyFile, sr) = 0 then
begin
repeat
if ((sr.Attr and faDirectory) = faDirectory) and
(sr.Name <> '.') and
(sr.Name <> '..') then
begin
FileList.Add(sr.Name);
end;
until
FindNext(sr) <> 0;
FindClose(sr);
end;
end;
Beispiel :
procedure TForm1.Button1Click(Sender: TObject);
begin
ListeDir('C:/ProgramData/Microsoft/Windows Defender/Platform/',
Memo1.Lines);
end;
Keine Kommentare:
Kommentar veröffentlichen