System.SysUtils.ChangeFileExt
Delphi
function ChangeFileExt(const FileName, Extension: string): string;
C++
extern DELPHI_PACKAGE System::UnicodeString __fastcall ChangeFileExt(const System::UnicodeString FileName, const System::UnicodeString Extension)/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Changes the extension of a file name.
ChangeFileExt takes the file name passed in FileName and changes the extension of the file name to the extension passed in Extension. Extension specifies the new extension, including the initial dot character.
ChangeFileExt does not rename the actual file, it just creates a new file name string.
Note: This function works with multi-byte character sets (MBCS).
See Also