Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit focus mode

FILE_RENAME_INFO structure (winbase.h)

  • 2024-02-22
Feedback

In this article

Contains the target name to which the source file should be renamed. Use only when callingSetFileInformationByHandle.

Syntax

typedef struct _FILE_RENAME_INFO {  union {    BOOLEAN ReplaceIfExists;    DWORD   Flags;  } DUMMYUNIONNAME;  BOOLEAN ReplaceIfExists;  HANDLE  RootDirectory;  DWORD   FileNameLength;  WCHAR   FileName[1];} FILE_RENAME_INFO, *PFILE_RENAME_INFO;

Members

DUMMYUNIONNAME

DUMMYUNIONNAME.ReplaceIfExists

This field is used whenSetFileInformationByHandle'sFileInformationClass parameter is set toFileRenameInfo.If this field isTRUE and the target file exists then the target file will be replaced by the source file. If thisfield isFALSE and the target file exists then operation will return an error.

DUMMYUNIONNAME.Flags

This field is used whenSetFileInformationByHandle'sFileInformationClass parameter is set toFileRenameInfoEx.

ReplaceIfExists

RootDirectory

This field should be set to NULL.

FileNameLength

The size ofFileName in bytes, not including the NUL-termination.

FileName[1]

A NUL-terminated wide-character string containing the new path to the file. The value can be one of the following:

  • An absolute path (drive, directory, and filename).
  • A path relative to the process's current directory.
  • The new name of an NTFS file stream, starting with:.

Requirements

RequirementValue
Minimum supported clientWindows Vista [desktop apps only]
Minimum supported serverWindows Server 2008 [desktop apps only]
Headerwinbase.h (include Windows.h)
RedistributableWindows SDK on Windows Server 2003 and Windows XP.

See also

FILE_INFO_BY_HANDLE_CLASS

SetFileInformationByHandle


Feedback

Was this page helpful?

YesNo

In this article

Was this page helpful?

YesNo