System.SysUtils.ExtractFileName

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function ExtractFileName(const FileName: string): string;

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall ExtractFileName(const System::UnicodeString FileName)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Extracts the name and extension parts of a file name.

The resulting string is the rightmost 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 string is equal to FileName, if FileName contains no drive and directory parts.

Note: This function works for multi-byte character systems (MBCS).

See Also


Code Examples