ExtractFileName

Declaration: ExtractFileName(FName: string): string;
Extracts the name and extension parts of the filename FName. The resulting string starts with the first character after the colon or backslash that separates the path information from the name.

Example: The expression ExtractFileName('C:\temp\Doc\readme.txt') returns the string 'readme.txt'.