Group: File Management - Library: kernel32
Replaces one file with another file, with the option of creating a backup copy of the original file.
BOOL WINAPI ReplaceFile(
__in LPCTSTR lpReplacedFileName,
__in LPCTSTR lpReplacementFileName,
__in_opt LPCTSTR lpBackupFileName,
__in DWORD dwReplaceFlags,
__reserved LPVOID lpExclude,
__reserved LPVOID lpReserved
); DECLARE INTEGER ReplaceFileA IN kernel32;
STRING lpReplacedFileName,;
STRING lpReplacementFileName,;
STRING lpBackupFileName,;
LONG dwReplaceFlags,;
INTEGER lpExclude,;
INTEGER lpReserved lpReplacedFileName [in] The name of the file to be replaced.
lpReplacementFileName [in] The name of the file that will replace the lpReplacedFileName file.
lpBackupFileName [in, optional] The name of the file that will serve as a backup copy of the lpReplacedFileName file. If this parameter is NULL, no backup file is created.
dwReplaceFlags [in] The replacement options.
lpExclude Reserved for future use.
lpReserved Reserved for future use.
If the function succeeds, the return value is nonzero.
In VFP use the ASCII version for this function, unless you specifically convert the first three input parameters (file names) into Unicode strings.
Home