delphi FileSearch 获取指定文件夹下所有文件包括隐藏文件


本文整理自网络,侵删。

 
 procedure FileSearch(const PathName, FileName : string) ;
 var Rec : TSearchRec;
 Path : string;
 begin
 Path := IncludeTrailingPathDelimiter(PathName) ;
 if FindFirst (Path + FileName, faAnyFile - faDirectory, Rec) = 0 then
 try
 repeat
 ListBox1.Items.Add(Path + Rec.Name) ;
 until FindNext(Rec) <> 0;
 finally
 FindClose(Rec) ;
 end;

{

用法:FileSearch('C:\Users\Desktop\_recovery','*.ini'); 获取指定扩展名文件

用法:FileSearch('C:\Users\Desktop\_recovery','*.*'); 获取所有文件

}

end; 

相关阅读 >>

Delphi xe android/ios 实现图片放大缩小的两种方法

Delphi xe5 for android 调用java类库必看的文件

Delphi从dbgrid导出数据保存成excel文件

Delphi 注入不用writeprocessmemory 函数

Delphi 金木水火土 生克用法

Delphi 让socket支持域名上线

Delphi 点击关闭叉时,最小化图标

Delphi判断字符串是否是数字、字母、大小写字母

Delphi urldownloadtofile 实现文件下载

Delphi richedit1 设置字体

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



打赏

取消

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

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

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

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

评论

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