 |
MoveFile Add comment W32 Constants Translate this page |
 |
 |
The MoveFile function moves an existing file or a directory, including its children.
To specify how to move the file, use the MoveFileEx function |
 |
 |
| Code examples: |
 |
|
|
 |
 |
| Declaration: |
 |
 |
BOOL MoveFile(
LPCTSTR lpExistingFileName, // file name
LPCTSTR lpNewFileName // new file name
);
|
 |
 |
 |
| FoxPro declaration: |
 |
 |
DECLARE INTEGER MoveFile IN kernel32;
STRING lpExistingFileName,;
STRING lpNewFileName
|
 |
 |
 |
| Parameters: |
 |
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
|
 |
 |
| Return value: |
 |
| If the function succeeds, the return value is nonzero |
 |
 |
| My comment: |
 |
MSDN: the MoveFile function will move (rename) either a file or a directory (including its children) either in the same directory or across directories.
The one caveat is that the MoveFile function will fail on directory moves when the destination is on a different volume -- use SHFileOperation instead.
See also: CopyFile, DeleteFile, MoveFileTransacted, SHFileOperation |
 |
 |
| Word Index links for the MoveFile : |
 |
|
|
 |
 |
| Translate this page: |
 |
|
 |
 |
| • |
 |
| Created: | 2001-07-12 12:00:00 | | Modified: | 2010-05-25 10:56:34 | Visited in last 7 days: 19 |