Delphi GetCurrentDir 获取当前文件夹

Posted 癫狂编程

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Delphi GetCurrentDir 获取当前文件夹相关的知识,希望对你有一定的参考价值。

//获取当前文件夹 GetCurrentDir
var
dir: string;
begin
dir := GetCurrentDir;
ShowMessage(dir); //C:Documents and SettingswyMy DocumentsRAD StudioProjects
end;

=============

function GetCurrentDir: string;
begin
GetDir(0, Result);
end;

以上是关于Delphi GetCurrentDir 获取当前文件夹的主要内容,如果未能解决你的问题,请参考以下文章

firemonkey获取当前文件所在路径的方法

GetCurrentDir

delphi Ini读写

delphi 获得父目录–指定级父目录

delphi如何模块内部获得自身路径ExtractFilePath和paramstr

delphi程序中为啥运行后程序窗口不显示,进程中有