none
Seeking conceptual guidance on creating/accessing NTFS Custom File Properties… RRS feed

  • Question

  • The Project

    I am working with a large repository of documents stored on a Windows server.

    • 39,965 files,  7,505 folders, 46GB of data
    • The docs of all types:  Word, Excel, .PDFs, audio recording, scanned hand written notes, etc.

    An improvised document management system as built up around these folders.  Legacy programs require that these folders and files be left in place.  I have been asked to build an app that makes it easier to search for specific documents. 

    My Questions

    1. Is the DSOFile.dll the best practice way to access Custom File Properties of files stored on an NTFS partition?
    2. Can a Custom File Property be created for any file type, or are they a function of the specific file type?  Can I create a new Custom File Property called “MyMetadata” and attach it to any file type?
    3. Is this a good example for me to follow?  http://social.msdn.microsoft.com/forums/en-us/netfxbcl/thread/173AB6DE-3CD8-448F-8C42-DE9D2240B913

    Thanks,

    John

    Monday, July 9, 2012 3:07 PM

Answers

All replies

  • Hi John,

    Welcome to the MSDN Forum.

    >>1. Is the DSOFile.dll the best practice way to access Custom File Properties of files stored on an NTFS partition?

    It is hard to say. Generally, we suggest a work way, is it a better one or worse one, it determined by the specific scenario.

    >>2. Can a Custom File Property be created for any file type, or are they a function of the specific file type?  Can I create a new Custom File Property called “MyMetadata” and attach it to any file type?

    Personally, I think this is answered by your third question.

    >>3. Is this a good example for me to follow?  http://social.msdn.microsoft.com/forums/en-us/netfxbcl/thread/173AB6DE-3CD8-448F-8C42-DE9D2240B913

    Please try it, if it works for you, it is a good one, if not, please feel free to follow up.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, July 10, 2012 6:52 AM
    Moderator
  • Thanks for the reply Mike.

    In retrospect I should have created a concept test app before I asked the questions.  Using these links I was able to create a c# .NET 4 app that could create, update, and delete Custom File Properties of any type on a file of any type.

    Good Basic Code Example: http://social.msdn.microsoft.com/forums/en-us/netfxbcl/thread/173AB6DE-3CD8-448F-8C42-DE9D2240B913

    Good Background Article: Dsofile, The Untold Story http://technet.microsoft.com/en-us/library/ee692828

    My initial confusion centered on the fact the Microsoft created dsofile.dll to work with Microsoft Office document types.  That said, it does work fine with any document type.  I was surprised that an interface for handling Custom File Properties was not part of the .Net Library.  I thought I might be missing something.

    Thanks again,

    John

    Tuesday, July 10, 2012 1:09 PM
  • Hi John,

    You are welcome.

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, July 11, 2012 2:47 AM
    Moderator