Sign in Join
FPDoc Onlineexperiment

ExtractFileName function

In unit sysutils

Extract the filename part from a full path filename.

Declaration

pascal
function ExtractFileName(const FileName: UnicodeString): UnicodeString

Description

ExtractFileName returns the filename part from FileName. The filename consists of all characters after the last directory separator character ('/' or '\') or drive letter.

The full filename can always be reconstructed by concatenating the result of ExtractFilePath and ExtractFileName.

For an example, see ExtractFileDir.

Errors

None.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.