14.06.2011, 23:00
|
|
.
|
|
Регистрация: 18.05.2011
Адрес: Омск
Сообщения: 3,970
Версия Delphi: 3,5,7,10,12,XE2
Репутация: выкл
|
|
Примерно так:
Код:
procedure TForm1.Button1Click(Sender: TObject);
var
sr : TSearchRec;
Len : Integer;
begin
Len := 0;
RichEdit1.Lines.Clear;
if FindFirst(ExtractFilePath(ParamStr(0)) + '\*.*', faAnyFile, sr) = 0 then
begin
repeat
if sr.Attr and faDirectory <> 0 then
RichEdit1.SelAttributes.Style := [fsBold]
else
RichEdit1.SelAttributes.Style := [];
RichEdit1.Lines.Add(sr.Name);
until FindNext(sr) <> 0;
FindClose(sr);
end;
RichEdit1.Lines.Add('');
RichEdit1.Lines.Add('Сканирование завершено.');
end;
|