DeleteAndRenameFile

The DeleteAndRenameFile function deletes the source file (lpszSourFile) after it copies the content of the source file to the destination file (lpszDestFile).

Syntax

BOOL DeleteAndRenameFile(LPCWSTR lpszDestFile, LPCWSTR lpszSourFile);

At a Glance

Header file: Winbase.h
Component: Fsysram
Platforms: H/PC
Windows CE versions: 1.01 and later

Parameters

lpszDestFile
Path to the destination file, and can not be NULL.
lpszSourFile
Path to the source file, and can not be NULL.

Remarks

The DeleteAndRenameFile function works for the RAM-based file system only. If the function fails it returns FALSE. Call GetLastError to get detailed error messages.