|
Overview |
|
|
|
Group |
|
|
|
Quick Info
Windows NT
| Yes
| Win95
| Yes
| Win32s
| Yes
| Import Library
| kernel32.lib
| Header File
| winbase.h
| Unicode
| WinNT
| Platform Notes
| None
|
|
|
MoveFile
The MoveFile function renames an existing file or a directory (including all its
children).
BOOL MoveFile(
LPCTSTR lpExistingFileName,
| // address of name of the existing file
| LPCTSTR lpNewFileName
| // address of new name for the file
| );
|
|
Parameters
lpExistingFileName
Points to a null-terminated string that names an existing file or directory.
lpNewFileName
Points 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 may be on a different
file system or drive. A new directory must be on the same drive.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error
information, call GetLastError.
Remarks
The MoveFile function will move (rename) either a file or a directory (including all 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.
See Also
CopyFile, MoveFileEx
Related Links
Software for Delphi and C++ Builder developers
Software for Visual Studio .NET developers
Software for Visual Basic 6 developers
Delphi Tips&Tricks
MegaDetailed.NET
More Online Helps
Win32 Programmer's Reference (win32.hlp)
Win32 Multimedia Programmer's Reference (mmedia.hlp)
OLE Programmer's Reference (ole.hlp)
Microsoft Windows Pen API Programmer's Reference (penapi.hlp)
Microsoft Windows Sockets 2 Reference (sock2.hlp)
Microsoft Windows Telephony API (TAPI) Programmer's Reference (tapi.hlp)
Unix Manual Pages
|