本文整理自网络,侵删。
function GetFilepath(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, 1, Length(FileName) - Contador));
end;
相关阅读 >>
Delphi adoconnection1连接mssql数据库方法
Delphi 如何判断clipboard剪切板中的内容的类型
更多相关阅读请进入《Delphi》频道 >>