GetFileNameWithoutExtension(Path: String): String;
Path - a path to a file.
The GetFileName method returns a file name of a specified path string without an extension.
Sub Main;
Var
Path_File, s: String;
Begin
Path_File:="c:\Work\1.txt";
s:=Path.GetFileNameWithoutExtension(Path_File);
End Sub Main;
After executing this example, the "s" variable contains 1.
See also: