title: Unique file identifier in windows
body: <p>Is there are way to uniquely identify a file (and possibly directories) for the lifetime of the file regardless of moves, renames and content modifications?  (Windows 2000 and later).  Making a copy of a file should give the copy it's own unique identifier.</p>
  
  <p>My application associates various meta-data with individual files. If files are modified, renamed or moved it would be useful to be able to automatically detect and update file associations.</p>
  
  <p>FileSystemWatcher can provide events that inform of these sorts of changes, however it uses a memory buffer that can be easily filled (and events lost) if many file system events occur quickly.</p>
  
  <p>A hash is no use because the content of the file can change, and so the hash will change.</p>
  
  <p>I had thought of using the file creation date, however there are a few situations where this will not be unique (ie. when multiple files are copied).</p>
  
  <p>I've also heard of a file SID (security ID?) in NTFS, but I'm not sure if this would do what I'm looking for.</p>
  
  <p>Any ideas?</p>