unique NTFS file ID

unique NTFS file ID

Post by Bernie Ohl » Sat, 26 Jul 2008 04:33:17

I'm porting an application from Unix and have encountered a problem. On
Unix there's a canonical test for absolute file equality: if two files
(or file handles) have the same inode and device numbers, they must be
the *same* file.

I've been unable to find an equivalent test on Windows. Especially with
the advent of symbolic links on Windows this is important since it's
possible to reach the same file via lexically different paths. So - is
there an easily available unique identifier which can provide the same

Bernie O

unique NTFS file ID

Post by Don Bur » Sat, 26 Jul 2008 05:03:01

There is a file ID but for anything but NTFS it is not guaranteed across
reboots or unmount/mounts of the file system. Take a look at

Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.yqcomputer.com/
Blog: http://www.yqcomputer.com/
Remove StopSpam to reply


unique NTFS file ID

Post by Pavel A » Sat, 26 Jul 2008 07:59:00

The NTFS file IDs are there exactly for the same purpose.