http://www.perlmonks.org?node_id=110843

idnopheq has asked for the wisdom of the Perl Monks concerning the following question:

-or-

How Structured Storage works in M$ Office files but not in other files

Is this right for SoPW? I dunno ... but this question will undoubtedly lead to more ...

For full prosed and prolix deails, head below the readmore tag. In summary, M$ Office docs deal with their "Structured Storage" ( SS ) differently than Windows Explorer ( WE ) does AFAICT. It looks as tho Office stores such data within the file itself.

I firmly believe the WE SS is in an NTFS Alternate Data Stream ( ADS - allows multiple data "files" to be associated with a single file or directory - see Q105763 from TechNet ) called ♣SummaryInformation, but I cannot access it via the normal filename:stream nomenclature nor tell how Windoze does.

Anyone have any experience with this? I imagine an API call or, more likely, some OLE ( see Q126157 from TechNet ) but cannot find the way ... I feel like I have the pieces but cannot figure out what the puzzle is supposed to look like.

I have tested opening a file in Word and setting the properties that way, but right now unless I want to save the resulting file ( like my perl code ) in an Office format I'll be doing it "the old fashioned way"; i.e. click-click-clicking my way to thinner fingers. I WANT PERL TO DO THIS FOR ME, DANG IT! And it seems to me well within perl's powers, once I figure out ( or someone tells me ) how to access this data!

WARNING: The following contains extensive parenthetical asides as our author is often inclined to do!

Background:

Once upon a time, there was a lad who felt he was somehow managing to "hold things together". His kids, boss, ex-wife, friends, and therapist all told him otherwise. So, he set out on a quest - a quest to organize.

He felt a great place to start would be his PC. His machine, affectionately known as ikiru, possessed all of his valuable data not yet dumped from grey matter ( not to mention all of his lovely perl code! ) . Our hero referenced http://freshmeat.net/articles/view/286/ as noted on a node here some time back ( tho he purged such in a previous fit of lossage ). His $HOME became tidy and somewhat referencable.

The hero remembered the neglected "Summary" portion of Windows Explorer and how he could have the Summary information appear in his directory listings. This seemed like a "Good Thing" in his most humble opinion.

Trying to use this "feature" of Windoze, he wanted to use the Summary property in Windows Explorer to help him better describe what various files held. But the monotony of clicking File - Properties - Summary on each thrilled him not. Such a task screamed
* A U T O M A T I O N *
into his oft bleeding ears. Seemed a trivial bit of coding for our hero, and he set off into the depths of Win32::OLE, OLE::Storage, Win32API::File, Win32::Ntfs, etc. But all, it seems, was for naught ( relating to this project, tho many tasty tidbits came to his eye ( which he will vaguely remember down the line and flogg himself when he cannot remember the details - hence this node ) ). Testing and searching the registry yielded no results.

After many hours of forcing TechNet to provide any useful information, he gave up on that tack. He Super Searched PM. Upon gleaning all he could from Google ( a nice resource occasionaly mentioned here is laola, also http://www.sysinternals.com and http://www.mvps.org/win32/index.html ), our hiro protagonist ( s/hiro/hero/; nod to Neal ;-) turned to the Monastary for aid.

BTW, insomnia is often less than advantageous IMHO ...

HELP!
--
idnopheq
Apply yourself to new problems without preparation, develop confidence in your ability to to meet situations as they arrise.