Set and Get text file properties

Hi All,
My application creates text files.

I need to modify, programmatically, the created file's properties (available via righ-click > properties > Summary).

Example 1: Set the string "Modified by Jack" into the comment field.

Example 2: Get the Revision Number.

Thanx, El.



Answer this question

Set and Get text file properties

  • Rashar

    What you actually want is to access the Structured Storage, which apparently, is not available via the .Net Framework.

    Fortunately, this guy ("Mark") wrote a C# class to do it.

    http://www.hightechtalks.com/dotnet-framework-interop/reading-file-summary-net-186754.html

    (Warning -- it seems that High Tech Talks' URL rewriter ignores everything in the URL except the ID number at the end. Which would be fine, except they'll apparently changed ID numbers recently. Google, for example, claims that page is at http://www.hightechtalks.com/dotnet-framework-interop/reading-file-summary-net-173601.html which is actually a completely different article. Which means I really can't say how long that link will be good for. To find the article manually, goto the High Tech Talk (register if you'd like), go to their "Dotnet Framework (Interop) " forum, at the bottom of the page, sort thread by title, Descending. Page through until you find the article titled "Reading File Summary in .NET" (presently, it's on page 33)



  • Zeeina

    Thanks the C# code worked. It would be nice to get it in VB6 code so I don't have to load the .NET Framework. But, At least it works.



  • Jehan Badshah

    ah! I thought this would be the approach for textfiles but apperently not...lets see....I believe its actually some form of shell extension. I'll see what else I can dig up

  • Malleswar

    Actually, it should be easier to do it from VB6, since you won't have to go throught the p/Invoke interface.

  • Arkette

    I am interested in this also. I can't find any way to do it from any language or API.

  • Prabu.

    take a look at this my friend:

    http://www.codeproject.com/csharp/dsofiledemo.asp



  • Lesego

    DSOFile is for Microsoft Office files only.

    I have text file.


  • Set and Get text file properties