IPath.GetDirectoryName

Syntax

GetDirectoryName(Path: String): String;

Parameters

Path — path to a file or a folder.

Description

The GetDirectoryName method returns information about a folder for the specified path.

Example

Sub UserProc;
Var
    Path_File, s: String;
Begin
    Path_File:="c:\Work\1.txt";
    s:=Path.GetDirectoryName(Path_File);
End Sub UserProc;

After executing the example, the "s" variable contains a path to a folder that contains the 1.txt file.

See also:

IPath