如何实现遍历一个目录下的文件。
解决方案 »
- 如何获得网卡(多个网卡)各自的型号及对应的IP地址?MAC地址
- 着急,问一个DBGrid的重画问题。
- 报表问题
- delphi 如何实现静态变量,指点一下。
- 关于文件的读出与写入
- 悬赏百分,请教高手赐教!如何解析一个字符串表达式?
- 做数字图像处理的请留个qq,(26136463),(26136463)
- printer selected is not valid ???在线等
- 如何让断开的Database 重新连接?
- 请问一下哪里有李维的delphi5.X ado/mts/com+书籍下载?
- 请教一个delphi连接odbc数据库的问题
- 一个小问题,请问怎么在windows2k中屏蔽系统(alt+f4,ctl+alt+del等)功能键!多谢!
sr: TSearchRec;
FileAttrs: Integer;
begin
StringGrid1.RowCount := 1;
if CheckBox1.Checked then
FileAttrs := faReadOnly
else
FileAttrs := 0;
if CheckBox2.Checked then
FileAttrs := FileAttrs + faHidden;
if CheckBox3.Checked then
FileAttrs := FileAttrs + faSysFile;
if CheckBox4.Checked then
FileAttrs := FileAttrs + faVolumeID;
if CheckBox5.Checked then FileAttrs := FileAttrs + faDirectory;
if CheckBox6.Checked then
FileAttrs := FileAttrs + faArchive;
if CheckBox7.Checked then FileAttrs := FileAttrs + faAnyFile; with StringGrid1 do
begin
RowCount := 0; if FindFirst(Edit1.Text, FileAttrs, sr) = 0 then begin
repeat
if (sr.Attr and FileAttrs) = sr.Attr then
begin
RowCount := RowCount + 1;
Cells[1,RowCount-1] := sr.Name;
Cells[2,RowCount-1] := IntToStr(sr.Size);
end;
until FindNext(sr) <> 0;
FindClose(sr);
end;
end;
end;