Results 1 to 11 of 11

Thread: How do you get the Summary Info from a File (non-Office)

  1. #1

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339

    How do you get the Summary Info from a File (non-Office)

    In windows 2000 and after (maybe sooner not sure) you can right click any file type and hit properties and there is a Summary tab which displays extra properties like Author, Title, Subject, Comments. How can you access this information via code?

    I've seen a dll that can do this but only for Office documents, which either stores them different or has its one internal set as well.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    That summary shows only when the file resides on a NTFS partition ,doesn't it ? I'm not sure if you can get that on other partition types !
    Let me see if I can find anything be of help !

  3. #3

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    That could be the case, all my drives are NTFS so I don't have any to test otherwise. Although I plan on using the code on one of these computers so that wont matter, not to me anyway. I assume there should still be a way to get the info, although I'm not sure how the FileSystem is storing it.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    This screen shows you the msgbox the appears while copying or moving file with summary info from NTFS to FAT32 .
    Attached Images Attached Images  

  5. #5
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474
    I would look at defining the IPropertyStorage and the
    IPropertySetStorage interfaces in .NET and then calling the
    StgCreateStorageEx or the StgOpenStorageEx functions (called through
    P/Invoke) to get the NTFS implementation of these interfaces to access
    property information for files in NTFS.

    Make sure this is running only on W2K or XP, as it is not supported on
    other systems (98, ME, NT4.0).

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - [email protected]
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  6. #6

    Thread Starter
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    Thanks Lunatic3 form that I have found this: http://users.chello.be/ws36637/properties.html . I'm not sure what language that code is in but I think I can go from there. I'll post back if I get anywhere.

    Getting closer: http://www.dotnet247.com/247referenc.../16/84250.aspx
    Last edited by Edneeis; Apr 6th, 2003 at 05:26 PM.

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I don't know if this would helps :



    or even this :


  8. #8
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    Re: How do you get the Summary Info from a File (non-Office)

    hi,

    cant see whats pirates posted:

    maybe this link might help:

    http://msdn.microsoft.com/library/de...ml/vb03c15.asp

  9. #9
    Frenzied Member
    Join Date
    Oct 2002
    Location
    Gammapolis
    Posts
    1,474

    Re: How do you get the Summary Info from a File (non-Office)

    Quote Originally Posted by veryjonny
    hi,

    cant see whats pirates posted:

    maybe this link might help:

    http://msdn.microsoft.com/library/de...ml/vb03c15.asp
    Wow! The thread is revived after 3 years... those were the days...

    Thanks veryjonny for posting the address to page. However I think this is not what Edneeis was asking about, and if you look at the page you mentioned and this page http://msdn.microsoft.com/library/de...classtopic.asp
    you will see that there is no reference to the properties such as author, subject,...
    'Heading for the automatic overload'
    Marillion, Brave, The Great Escape, 1994

    'How will WE stand the FIRE TOMORROW?'
    Eloy, Silent Cries and Mighty Echoes, The Vision - Burning, 1979

  10. #10
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    297

    Re: How do you get the Summary Info from a File (non-Office)

    I've messed with property storage recently, messing about with IMAPI.

    (IMAPI uses structured storage to store the files that you send to a CD to write. It uses property storage to store drive properties too. I managed to implement structured storage, and burn CDs to disc, but then found a slight problem - there is a limitation of 32 chars for a filename. argh. )

    Anyway, I already had most of the work done to read these properties from a file, so here is a program that can read the properties stored for ntfs files and office docs (office docs have their own implementation of structured storage, not sure of the details yet, if you try to use stgOpenStorageEx with STGFMT.File when its a doc then it fails so I used STGFMT.Any and the properties map anyway...)

    I'll probably modify it sometime to write the properties too (it will need to create the structured storage for the properties if it doesn't exist).

    There might be a .Net way to do this built in. Images have the PropertyItem class to retrieve their metadata which is stored the same way...

    note: most files have no information, you have to write some first...
    vb 2005...
    Attached Files Attached Files
    Last edited by jo0ls; Apr 19th, 2006 at 03:10 PM.

  11. #11
    PowerPoster
    Join Date
    Nov 2001
    Location
    Trying to reach and stay in the cloud
    Posts
    2,089

    Re: How do you get the Summary Info from a File (non-Office)

    Quote Originally Posted by Lunatic3
    Wow! The thread is revived after 3 years... those were the days...
    Didnt notice the thread date. was looking for something similar when I found this thread in the search; thought would post just in case someone else needs it.

    Finally I used this one: System.Diagnostics.filesysteminfo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width