IPath.GetFileNameWithoutExtension

Syntax

GetFileNameWithoutExtension(Path: String): String;

Parameters

Path - path to a file.

Description

The GetFileName method returns a file name of the specified path string without an extension.

Example

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

After executing the example, the "s" variable contains 1.

See also:

IPath