网站首页  词典首页

请输入您要查询的函数:

 

术语 movefile
释义 MoveFile
语法:
C++
BOOL WINAPI MoveFile(
__in LPCTSTR lpExistingFileName,
__in LPCTSTR lpNewFileName
);
MoveFile函数
移动一个现有的文件或目录,包括其子女。
要指定如何移动文件,使用MoveFileEx或MoveFileWithProgress功能。
作为一个要执行此操作的事务操作,请使用MoveFileTransacted功能。
参数
lpExistingFileName [in]
该文件或在本地计算机上的目录的当前名称。
在此函数的ANSI版本,名称被限制为MAX_PATH字符。为了延长此限制,以32,767宽字符,调用的功能和前面加上“\\ Unicode版本\\?\\”的路径。有关更多信息,请参见命名一个文件。
lpNewFileName [in]
为文件或目录的新名称。新的名称必须不存在。一个新的文件可能在不同的文件系统或驱动器。一个新的目录必须在同一驱动器。
在此函数的ANSI版本,名称被限制为MAX_PATH字符。为了延长此限制,以32,767宽字符,调用的功能和前面加上“\\ Unicode版本\\?\\”的路径。有关更多信息,请参见命名一个文件。
返回值
如果函数成功,返回值为非零。
如果函数失败,返回值是零。为了获得更多错误信息,调用GetLastError。
备注
该MoveFile函数将移动(重命名)或者一个文件或文件(包括其子女的目录或在同一目录中或跨)目录。一个需要注意的是MoveFile函数将失败的目录中移动目标时,在不同的卷。
如果在一个文件卷移动,MoveFile不会移动的文件的安全描述符。该文件将被分配在目标目录中的默认安全描述符。
该MoveFile函数协调与跟踪服务环节的运作,使连结来源可以追踪到这些被移动。
要求:
最低支持:client-Windows 2000专业版
最低支持server-Windows 2000服务器
HeaderWinBase.h(头文件:winuser.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode和ANSI namesMoveFileW(Unicode)和MoveFileA(ANSI)的
参见
CopyFile
文件管理函数
MoveFileEx
MoveFileTransacted
MoveFileWithProgress
如果有任何问题和意见,请发送给微软(wsddocfb@microsoft.com)
生成日期:2009年9月3日
==英文原文==MoveFile Function
Moves an existing file or a directory, including its children.
To specify how to move the file, use the MoveFileEx or MoveFileWithProgress function.
To perform this operation as a transacted operation, use the MoveFileTransacted function.
Syntax
C++
BOOL WINAPI MoveFile(
__in LPCTSTR lpExistingFileName,
__in LPCTSTR lpNewFileName
);
Parameters
lpExistingFileName [in]
The current name of the file or directory on the local computer.
In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\\\?\\" to the path. For more information, see Naming a File .
lpNewFileName [in]
The new name for the 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.
In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to 32,767 wide characters, call the Unicode version of the function and prepend "\\\\?\\" to the path. For more information, see Naming a File .
Return Value
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 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.
If a file is moved across volumes, MoveFile does not move the security descriptor with the file. The file will be assigned the default security descriptor in the destination directory.
The MoveFile function coordinates its operation with the link tracking service, so link sources can be tracked as they are moved.
Requirements
Minimum supported clientWindows 2000 Professional
Minimum supported serverWindows 2000 Server
HeaderWinBase.h (include Windows.h)
LibraryKernel32.lib
DLLKernel32.dll
Unicode and ANSI namesMoveFileW (Unicode) and MoveFileA (ANSI)
See Also
CopyFile
File Management Functions
MoveFileEx
MoveFileTransacted
MoveFileWithProgress
Send comments about this topic to Microsoft
Build date: 9/3/2009
==原始网址==http://msdn.microsoft.com/en-us/library/aa365239(VS.85).aspx\n
随便看

 

windows api函数参考手册包含2258条windows api函数文档,详细介绍nodejs、java、rust调用windows api的方法技巧,是学习windows api编程的入门中文文档。

 

Copyright © 2004-2023 Winrtm.com All Rights Reserved
京ICP备2021023879号-40 更新时间:2024/10/6 9:20:27