RAD Studio VCL Reference
AnsiStrings.ExtractFileName Function

Extract name and extension parts of filename.

function ExtractFileName(const FileName: AnsiString): AnsiString; overload;
AnsiString ExtractFileName(const AnsiString FileName);

ExtractFileName extracts the name and extension parts of the given filename. The resulting AnsiString consists of the leftmost characters of FileName, starting with the first character after the colon or backslash that separates the path information from the name and extension. The resulting AnsiString is equal to FileName if FileName contains no drive and directory parts. 


Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!