Delphi 查询当前目录下文件名是否存在


本文整理自网络,侵删。

 
procedure TForm1.Button1Click(Sender: TObject);
var
  FileToFind: string;
begin
  FileToFind := SysUtils.FileSearch(Edit1.Text, GetCurrentDir);
  if FileToFind = '' then
    ShowMessage('Couldn''t find ' + Edit1.Text + '.')
  else
    ShowMessage('Found ' + FileToFind + '.');
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
  Label2.Caption := GetCurrentDir;
end;

相关阅读 >>

Delphi用twebbrowser组件在Delphi中post数据和取得网页源文件

如何在 Delphi 中静态链接 sqlite

Delphi中unicode转中文

Delphi如何实现模拟组合按键,如发送ctrl_f的按键消息

Delphi idhttp批量上传图片

Delphi中的各种文件类型介绍

Delphi xe安装2010版控件

Delphi安装*.pas扩展名的控件

Delphi xe5也可以开发 google glass应用

Delphi sametext

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



打赏

取消

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

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

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

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

评论

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