使用FindFirst, FindNext, FindClose等函数的协同完成枚举的工作。
解决方案 »
- 企业盘点表SQL的写法?请教高手!在线急等!!!!!!
- 怎么不报错退出呢
- 请大家推荐一个升级包安装制作程序
- 求传奇2中mir.db,hum.db,id.db的数据结构及打开方法!
- 我在delphi中开发activex control,添加一个属性比方说long test_value后,会产生Get_test_value和Set_test_value两个方法,可是在Get_tes
- 如果不发这个,我不是人啊。我不是人啊。一定要发:猛禽是如何被MM虐待的!哈哈哈。
- 有谁用国Qrdesign这个报表制作控件,如何用,那里有资料?
- 招聘Delphi 兼职程序员,要求有至少2年以上的开发经验,对电子书的开发能够胜任.
- 谁能帮我翻译一下RunDosInMemo这个函数
- 关于随机抽题的问题!!!
- 如何实现动态的打开文件和改变其属性
- 谁能解决????????????
写得很详细
[email protected]
不要光说不炼,把你的例子公布出来。
留你的E_mail有何用!
procedure TForm1.DoSearchPathFile(qPath: string);
var
SR: TSearchRec;
FileAttr: Integer;
begin
FileAttr := faDirectory;
FindFirst(qPath + '\*.*', FileAttr, SR); While FindNext(SR) = 0 do
begin
if (SR.Name <> '.') and (SR.Name <> '..') then begin
if DirectoryExists(qPath + '\' + SR.Name) then
begin
ListBox1.Items.Add('路径'+ qPath + '\' + SR.Name);
DoSearchPathFile(qPath + '\' + SR.Name); end;
//;else ListBox1.Items.Add(qPath + '\' + SR.Name); end;
end; FileAttr := faAnyFile; FindFirst(qPath + '\*.*', FileAttr, SR);
while FindNext(SR) = 0 do
begin
if (SR.Name <> '.') and (Sr.Name <> '..') then
begin
if not(DirectoryExists(qPath + '\' + SR.Name)) then
ListBox1.Items.Add(qPath + '\' + SR.Name);
end;
end;
end;