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