GetFullPath(Path: String): String;
Path - file or folder, for which an absolute path must be obtained.
The GetFullPath method returns an absolute path for the specified string. An absolute path is returned by taking into account a work directory of an application, its existence on the hard drive is optional.
Sub UserProc;
Var
Path_File, s: String;
Begin
Path_File:="c:\Work\1.txt";
s:=Path.GetFullPath(Path_File);
End Sub UserProc;
After executing the example, the "s" variable contains an absolute path to the 1.txt file.
See also: