Mam mały problem z wyszukiwaniem plików o rozszerzeniu .~ , .* , *.~ , cos.* itp.
Chodzi mi o wyszukiwanie powyższych plików razem tak jak to robi Wyszukiwarka Windowsa po każdym pliku oddziela się go "," (przecinkiem)
Robię tak:
procedure Skanuj(Dir:String);
var
SRec: TSearchRec;
res: Integer;
ec: Char;
begin
if SkanujStop=True then
Exit;
ec := ':';
if dir <> '' then ec := dir[Length(dir)];
if (ec <> ) and (ec <> ':') then dir := dir +
;
res := FindFirst(dir + (np. .~;.~*), faAnyFile and faSysFile, SRec);
while res = 0 do begin
if SkanujStop=True then
Exit;
with PlikiWyszukane.Items.Add do
begin
Caption:=dir+SRec.Name;
SubItems.Add(IntToStr(SRec.Size div 1024)+' KB');
end;
res := FindNext(SRec);
Application.ProcessMessages;
end;
FindClose(SRec);
res := FindFirst(dir + '*', faDirectory, SRec);
while res = 0 do begin
if (SRec.Attr and faDirectory <> 0)
and (SRec.Name <> '.' ) and (SRec.Name <> '..') then
Skanuj(dir + srec.Name);
res := FindNext(SRec);
end;
FindClose(SRec);
end;