Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Property sheets & multiple file streams 1

Status
Not open for further replies.

DrHeadgear

Programmer
Oct 12, 2001
14
0
0
DK
I'm trying to access some of the multiple file streams used in e.g. summary information for a file on NTFS volumes.

I'm using some stuff from Dino Esposito on MSDN:


To access one of the underlying named streams for a file I need this syntax: fileName:streamName

Does anyone know what the standard stream name is for e.g. file summary information?

If I don't know the stream name I can enumerate through the streams for a file (says Dino) but I only have C++ code for it, which doesn't really help me much.

The functions this enumeration uses are BackupRead() and some other related stuff. Are these available to VB or do I have to integrate C++ code somehow?

Any pointers will be gratefully received, thanks. "Lets integrate!"
If it doesn't work it's not my fault.
 
File summary information (and other properties of, say, Office documents) are not held in NTFS file streams. If they were, how would you access them when running using FAT volumes?

An Office document is an example of Structured Storage (which in many respects is a disk-based representation of an OLE object). There is at least one library downloadable from MS which will allow you to access the document properties of any Office or Office-compatible documents. Can't remember what it is called off hand though, I'm afraid.
 
Thanks for that.

I hadn't realised that summary info for e.g. a txt file is handled differently to office files, i.e. that summary is only available for txt files on NTFS volumes while office files can also contain this info on FAT volumes. I guess my search for a generic solution isn't going to go too well....

I'll have a look for the libraries you mention, cheers. "Lets integrate!"
If it doesn't work it's not my fault.
 
Sorry, a quick PS:

I still have the question of what the summary info stream name is for documents other than Office docs. This is definitely a stream, but whats it called?

Anyone know? "Lets integrate!"
If it doesn't work it's not my fault.
 
Which documents do you believe that you can get summary information for?
 
Well, on NTFS all files have a "Summary" tab in their property pages. Apart from the Office documents, which maintain this data elsewhere, moving these files to FAT produces a dialogue box which warns that the file contains multiple streams, which will be lost to FAT.

So I accept the need to extract this info from Offices docs in some other way, but there seems to be a default "Summary" tab, produced from a secondary stream, which I'd really like to get hold of. I'm not interested in the property page itself, but the data associated with it: i.e. meta-data on the file itself. Ideally I'd like to be able to get this info for anything that could be represented as a file object in the scripting library.

I've mainly been programming business logic for web solutions up to now, so all this is fairly new to me. Give me an SQL JOIN with multiple conditions any day.....

Thanks for the interest. "Lets integrate!"
If it doesn't work it's not my fault.
 
Not on my NT setup today they don't. And not since NT was introduced. Nor on any of the 250 (OK, I checked a small sample, not the whole lot) nearby machines. Which is why I asked the question.

So, I'll summarise the information so far. NTFS files do not have summary properties by default. Those that do generally have them as a result of being structured storage.

Specific files produced by a specific application under NT may have summary information that is kept in a stream. Indeed, a service may have been added to an NT box to add a summary stream whenever a file is written, and to provide extensions to the shell so that a right-click on a file with such an extension provides a summary tab, but I assure you that this is not a native feature of NTFS.

Under Windows 2000 there is a minor change. The W2000 shell itself supports summary properties in a stream (i.e the equivalent of the service we hypothesised for NT). Naturally, such stream info won't work by default for any MS OS prior to Windows 2000, because they have no way of identifying it. However, here are the relevant stream names:

^EDocumentSummaryInformation

^ESebiesnrMkudrfcoIaamtykdDa

^ESummaryInformation

(where ^E represent CHR$(05))
 
Thanks for that, very helpful.

My survey of the single NTFS volume near me (our test server) was obviously too small a sample... Thats what happens when developers are playing around with usefull looking tools.

It does use the SummaryInformation stream though (apart from on the Office docs), which I can now access.

My only problem now is encoding, the text values are fine, but I don't get any human readable field names.

Cheers, at last I'm making some progress. "Lets integrate!"
If it doesn't work it's not my fault.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top