Is there any way to keep a reference to a file even if it is moved or renamed?

  • Thread starter Thread starter google
  • Start date Start date
G

google

My company has a large filesystem that holds hundreds of thousands of
documents related to the business. Sometimes I have the need to keep
metadata for some of the documents. This data could be comments, or the
document's status in a process, etc.

The simplest way to do this is to keep the metadata in a database and
reference the file's full path. The biggest problem with doing it this
way is if the file is moved or renamed the reference will break.

Is there a better way of keeping a reference to a file? It looks like
an NTFS file has an optional "object id" attribute that is used by the
Distributed Link Tracking Service, but I couldn't find any
documentation for using this.

Does anyone have any suggestions?

Thanks in advance,
Epson
 
My company has a large filesystem that holds hundreds of thousands of
documents related to the business. Sometimes I have the need to keep
metadata for some of the documents. This data could be comments, or the
document's status in a process, etc.


What do you do with the metadata? If you just want to attach it to the
document, then an NTFS stream is the ticket (already used by MS to store
author, etc for documents and viewable in the file properties dialog).

If you need search, etc., then database is better. You might look at
updating your paths using the volume journal.
http://www.microsoft.com/msj/0999/journal/journal.aspx
 
Does anyone have any suggestions?

As long as the file stays on the same volume (but that might be too
big a limitation), you can use the file index as returned by the
GetFileInformationByHandle API.


Mattias
 
Back
Top