[Overview][Constants][Types][Classes][Procedures and functions][Variables] Reference for unit 'sysutils' (#rtl)

ChangeFileExt

Change the extension of a filename.

Declaration

Source position: finah.inc line 27

function ChangeFileExt(

  const FileName: String;

  const Extension: String

):String;

Description

ChangeFileExtchanges the file extension in FileNameto Extension. The extension Extensionincludes the starting .(dot). The previous extension of FileNameare all characters after the last ., the .character included.

If FileNamedoesn't have an extension, Extensionis just appended.

Errors

None.

See also

ExtractFileName

  

Extract the filename part from a full path filename.

ExtractFilePath

  

Extract the path from a filename.

ExpandFileName

  

Expand a relative filename to an absolute filename.