包括文件和子目录,最好能够列出文件还是目录求源码...在线给分....全给[email protected] 请发到我邮箱...
解决方案 »
- Delphi 7 开启COMM问题,
- 控件自身释放的问题: 如何在KeyDown中Free自己?
- 请问这样的组合查询语句能连接成一个表吗?
- 关注中国程序员,关注中国软件业的请进,欢迎评论
- delphi能将编辑好的文本按照格式,颜色,图片等信息生成html
- 怎么样选择一个文件夹以存放文件?
- 发布繁体中文版程序的问题:如何从简体中文翻译到繁体中文?两者的惯用语不一样
- Excel操作错误问题,请有各位经验的大哥帮帮小弟?
- 在intetface中用uses与在implementation中用uses有什么区别
- 请问各位都在用什么版本控制软件?
- 求教WaitForMultipleObjects的用法
- 如何往数据库里批量添加记录?
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;