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.
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 !
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.
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).
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.
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
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...
Re: How do you get the Summary Info from a File (non-Office)
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