2

Earlier today someone generously answered my question regarding the retrieval of a unique identifier associated with files on the computer. Unique File Identifier

The solution worked great, however, it does not address unique identifiers for folders. How can I retrieve a UID for specified directories, UID's that will stay with the directory through renames and moves.

Update: FSCTL_GET_OBJECT_ID seems like it is the function I am after, but would someone be able to provide brief context on the usage? Thanks!

Community
  • 1
  • 1
Trent Seed
  • 344
  • 5
  • 16
  • I don't think that's what you need - those are assignable object ID-s. As per this link [2.4.20 FileInternalInformation](http://msdn.microsoft.com/en-us/library/cc232072(v=prot.13).aspx) it says `by the file system and is unique to the volume on which the file or directory is located` (btw. that's the same thing, just from C++ perspective more, there is only one 'ID' for file/dir). Anyway, identifiers should not discriminate directories in any way, as you can move them alike etc. I'm not putting this as an answer - but I think it actually is. What's actually 'not working'? – NSGaga-mostly-inactive Apr 12 '12 at 22:43

1 Answers1

2

I put this into an answer, because it was too much text for a comment.

I answered your question regarding Unique File Identifiers. I didn't dig in too deep into this topic. That's been just good researching skills.

I researched a bit and collected some documentation links that may help you:

I've been searching for quite a time, but I couldn't find anything which identifies each folder, regardless of its path.

The only folders, which always can be identified - as far as I know, yet - are these known folders. That's because one WinOS uses the C:/winnt/Windows Net/ and another one uses D:/Windows/Net/ path (don't look up those, I just made them up off the top of my head).

Michael Schnerring
  • 3,584
  • 4
  • 23
  • 53