in reply to Uniquely identifying files on windows
NTFS supports Reparse Points -- MS's name for hard links -- so it's possible to have two paths refer to the same file. There is a function you can call to get the GUID of the Reparse Point. Judging by the name, this should be unique across all devices and machines.
On a given FAT device, the path is the unique identifier (once "." and ".." are properly removed). However, it is tricky to determine whether two devices are the same (in part or in whole). Given
the following could all refer to the same file:net use z: \\127.0.0.1\c$ net use y: \\127.0.0.1\share_c net use x: \\10.0.0.5\c$ net use w: \\tribble05\c$ subst v: c:\ net use u: \\127.0.0.1\c$\dir net use t: \\127.0.0.1\share_dir subst s: c:\dir
c:\dir\file z:\dir\file y:\dir\file w:\dir\file v:\dir\file x:\dir\file u:\file t:\file s:\file
It's even trickier once virtual drivers and shares on non-Windows machine come into play.
|
|---|