FILE_RENAME_INFORMATION - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
#ifndef _NTIOAPI_H

typedef struct _FILE_RENAME_INFORMATION
{
    BOOLEAN ReplaceIfExists;
    HANDLE RootDirectory;
    ULONG FileNameLength;
    _Field_size_bytes_(FileNameLength) WCHAR FileName[1];
} FILE_RENAME_INFORMATION, *PFILE_RENAME_INFORMATION;

#endif

View code on GitHub

This structure is documented in Windows Driver Kit.


Structure FILE_RENAME_INFORMATION is used as input buffer for function NtSetInformationFile, called with FileRenameInformation information class. Using this structure caller can rename file, or move it into other directory.

ReplaceIfExists

If set, and file with the same name as destination exist, it will be replaced. If no, STATUS_OBJECT_NAME_COLLISION is returned.

RootDirectory

Optional HANDLE to parent directory for destination file.

FileNameLength

Length of FileName array, in bytes.

FileName[1]

UNICODE string specifying destination file name. If RootDirectory is NULL, it must contains full system path, or only destination file name for in-place rename operation.

Documented by

See also