procedure TForm1.Button1Click(Sender: TObject);<br><br>var<br> sr: TSearchRec;<br> FileAttrs: Integer;<br>begin<br> StringGrid1.RowCount := 1;<br> if CheckBox1.Checked then<br> FileAttrs := faReadOnly<br> else<br> FileAttrs := 0;<br> if CheckBox2.Checked then<br> FileAttrs := FileAttrs + faHidden;<br> if CheckBox3.Checked then<br> FileAttrs := FileAttrs + faSysFile;<br> if CheckBox4.Checked then<br> FileAttrs := FileAttrs + faVolumeID;<br> if CheckBox5.Checked then<br><br> FileAttrs := FileAttrs + faDirectory;<br> if CheckBox6.Checked then<br> FileAttrs := FileAttrs + faArchive;<br> if CheckBox7.Checked then<br><br> FileAttrs := FileAttrs + faAnyFile;<br><br> with StringGrid1 do<br> begin<br> RowCount := 0;<br><br> if FindFirst(Edit1.Text, FileAttrs, sr) = 0 then<br><br> begin<br> repeat<br> if (sr.Attr and FileAttrs) = sr.Attr then<br> begin<br> RowCount := RowCount + 1;<br> Cells[1,RowCount-1] := sr.Name;<br> Cells[2,RowCount-1] := IntToStr(sr.Size);<br> end;<br> until FindNext(sr) <> 0;<br> FindClose(sr);<br> end;<br> end;<br>end;<br><br>-----<br>http://www.8421.org