2

We have a some files or directories with their absolute paths.
These files or directories will be renamed in a process. We can't get the new names from the process at all, but we have the root directory full name(full absolute path)
Now, I wanna find that items again
Is there a unique key or something for directories or files to find them without the exact name?

Mohammad Dayyan
  • 18,338
  • 35
  • 143
  • 207

1 Answers1

6

No, there is nothing directly available on regular NTFS from C# code to do so.

You can

  • compute some sort of hashes of files yourself + size check to find them again after rename (if they simply renamed)
  • use events from FileSystemWatcher to track file movements
  • add alternative streams to files if they will not be stripped by "the process" to use as custom markers.
Community
  • 1
  • 1
Alexei Levenkov
  • 94,391
  • 12
  • 114
  • 159