delphi 得到文件夹下所有文件名


本文整理自网络,侵删。

 procedure TForm1.Button1Click(Sender: TObject);
var
ss:Tsearchrec;
filepath:string;
begin
filepath:=Edit1.Text;
listbox1.Items.Clear;
if findfirst(filepath+'*.*',faAnyFile,ss)=0 then
begin
if not ((ss.Attr and fadirectory)=fadirectory) then
listbox1.Items.Add(ss.Name);
while findnext(ss)=0 do
begin
if not ((ss.attr and fadirectory)=fadirectory) then
listbox1.Items.Add(ss.Name);
end;
findclose(ss);
end;

end;
 

相关阅读 >>

Delphi 10.3 控件遮挡 webbrowser

Delphi通过代码实现模拟按键的函数

Delphi通过将数据放入exe的资源信息中的方式制作自已的安装工具

Delphi 给label1字加边的又一个算法

Delphi 自动关闭弹出的窗口

Delphi encodeuricomponent

Delphi 透明窗体

Delphi 时间与字符串

Delphi idhttp最简洁的修改和取得cookie例子

Delphi tedit 编辑框 中文使用说明

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...