本文整理自网络,侵删。
function GetFileName(FileName: string): string; {从路径中分离文件名}
var Contador: integer;
begin
Contador := 1;
while Copy(FileName, Length(FileName) - Contador, 1) <> '\' do
begin
Contador := Contador + 1;
end;
Result := (Copy(FileName, Length(FileName) - Contador + 1, Length(FileName)));
end;
相关阅读 >>
Delphi program name、process id、window handle、process handle 的转换函数
Delphi ifileoperation替换shfileoperation
Delphi xe5 for android 调用java类库必看的文件
Delphi 从listview组件中的选定行在数据库中删除
更多相关阅读请进入《Delphi》频道 >>