System.SysUtils.ChangeFilePath

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

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

C++

extern DELPHI_PACKAGE System::UnicodeString __fastcall ChangeFilePath(const System::UnicodeString FileName, const System::UnicodeString Path)/* overload */;

Properties

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

Description

Changes the path of a file name.

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).

See Also