DeleteAndRenameFile

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This function deletes a file after copying its contents to the destination file. The source file and the destination file must already exist.

Syntax

BOOL DeleteAndRenameFile( 
  LPCWSTR lpszDestFile, 
  LPCWSTR lpszSourceFile 
);

Parameters

  • lpszDestFile
    [in] Pointer to a null-terminated string that contains the path of the destination file. This parameter cannot be set to NULL.
  • lpszSourceFile
    [in] Pointer to a null-terminated string that contains the path of the source file. This parameter cannot be set to NULL.

Return Value

TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError.

Remarks

This function works for the object store RAM-based file system only.

If this function fails, both the source file and destination file are unchanged.

Requirements

Header winbase.h
Library coredll.lib
Windows Embedded CE Windows CE 1.01 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

File I/O Functions