Delphi 根据文件路径获取文件名


本文整理自网络,侵删。

 

 

function GetMovieName(const fn: string): string;

var

  i:Integer;

  s:string;

begin

  s := trim(fn);

  if s[Length(s)]='\' then

    s := Copy(s,1,Length(s)-1);

 

  while Pos('\',s)>0 do

  begin

    i := Pos('\',s);

    s := Copy(s,i+1,Length(s)-i);

  end;

  Result := s;

end;

相关阅读 >>

Delphi fastreport快速入门

Delphi 图像识别技术(逐行扫描识别)

Delphi 圆角panel

Delphi webbrowser1 保存文档为 .html

incsecond:将一个tdatetime变量加减一定数量的秒数

Delphi 获取cpu monitor使用率

Delphi webbrowser控件实现对ie浏览器的各种控制

Delphi利用线程注入技术实现刷新流量

Delphi 简单的旋转图像角度代码

Delphi之tclientsocket和tserversocket使用tcp keepalive心跳机制实现“断网”、"断电"检测

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



打赏

取消

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

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

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

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

评论

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