Possible Duplicate:
Unique file identifier in windows
I need to retrieve a unique identifier for certain files on the computer, and have only came across the Win32 GetFileInformationByHandle function. How can I accomplish this with the. NET framework?
Update: I need a persistent id that will not change if the file is moved, updated, renamed, etc.
Update2: How can the same be accomplished with folders?
Here’s some code from Ashley Henderson I copied from this answer. It implies two approaches which both return the same unique identifier.