怎样枚举某个目录下的所有文件夹,谢谢,用拿套函数,最好能个简单例子,万分感谢!!!
解决方案 »
- 哪位大哥买了正版DELPHI,多少钱呢要??
- 关于Cxgrid
- 招delphi程序员(成都) 开发自助终端系统
- ★高分求救.....关于【数组】的两个疑问??.........................................................
- 请问用delphi做corba时,若是局域网,则要在客户端加上代理,如果在internet上呢?
- 怪事,是哪里问题?高手是小菜一碟?
- 关于播放时的提示错误!
- 300 分 索取 利用Delphi5/6 编写的 COM DLL的源代码例子!
- 难道要问李维?!
- 有人看过程序员杂志第二期中《用delphi编写一个实用的db控件》吗?
- 这样的功能怎么实现啊???
- 各位高手,怎么在程序里实现获取各种*.exe文件的图标.
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;