Export (0) Print
Expand All
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

MoveFile

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This function renames an existing file or a directory, including all its children. A RAPI version of this function exists called CeMoveFile (RAPI).


BOOL MoveFile(
  LPCTSTR lpExistingFileName, 
  LPCTSTR lpNewFileName
); 

lpExistingFileName

[in] Pointer to a null-terminated string that names an existing file or directory.

lpNewFileName

[in] Pointer to a null-terminated string that specifies the new name of a file or directory. The new name must not already exist. A new file can be on a different file system or drive. A new directory must be on the same drive.

Nonzero indicates success. Zero indicates failure. To get extended error information, call GetLastError.

This function moves or renames either a file or a directory, including all its children, either in the same directory or across directories. This function fails on directory moves when the destination is on a different volume.

Aa911770.note(en-us,MSDN.10).gifNote:
An unprivileged application can use this function to move or rename a directory that contains a system file. Such a change effectively deletes the system file because it is no longer found in the expected location. Therefore, to fully protect system files, their directory should also have the system attribute.

To store the maximum number of files on PC card storage devices, limit file names to eight uppercase characters and file extensions to three uppercase characters. In addition, do not allow non-OEM characters in file names. File names that do not conform to these limits require more than one physical directory entry on a PC card.

Headerwinbase.h
Librarycoredll.lib
Windows Embedded CEWindows CE 1.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2014 Microsoft