RAD Studio VCL Reference
SysUtils.ChangeFilePath Function

Changes the path of a file name.

function ChangeFilePath(const FileName: string; const Path: string): string; overload;
AnsiString ChangeFilePath(const AnsiString FileName, const AnsiString Path);

ChangeFilePath replaces the drive and directory parts of the passed FileName with the passed Path value. If Path is not blank, it must specify a drive (terminated by a colon) and/or a directory (terminated by a backslash). 

ChangeFilePath does not rename the actual file, it just creates a new file name string.

Note: This function works with multi-byte character sets (MBCS).


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