_FILE_RENAME_INFO structure

Contains the name to which the file should be renamed. Use only when calling SetFileInformationByHandle.

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

TRUE to replace the file; otherwise, FALSE.

DUMMYUNIONNAME.Flags

ReplaceIfExists

TRUE to replace the file; otherwise, FALSE.

RootDirectory

A handle to the root directory in which the file to be renamed is located.

FileNameLength

The size of FileName in bytes.

FileName

The new file name.

Requirements

   
Windows version Windows Vista [desktop apps only] Windows Server 2008 [desktop apps only]
Header winbase.h (include Windows.h)

See Also

FILE_INFO_BY_HANDLE_CLASS

SetFileInformationByHandle