[Tutor] Getting file properties on winodws

vishwajeet singh dextrous85 at gmail.com
Thu May 21 22:00:47 CEST 2009


On Fri, May 22, 2009 at 1:23 AM, Tim Golden <mail at timgolden.me.uk> wrote:

> Tim Golden wrote:
>
>> Tim Golden wrote:
>>
>>> It would probably help if you specified what "does not seem[s] to be
>>> working" meant. But I assume that you mean: if you add a Title into
>>> the Summary on a JPEG then it doesn't get picked up by the script.
>>> What's happening here (I think) is that for media types -- images,
>>> movies, etc. -- the [Summary] property sheet is overridden, probably
>>> by Windows Media Player which will use the properties embedded in
>>> the JPEG (EXIF) or WMV. This isn't Structured Storage as such and
>>> so isn't extracted by the script I showed.
>>>
>>> If I get a chance, I'll look into this a bit further.
>>>
>>
>> In principle, it ought to be possible to do this by
>> querying the IID_IPropertySetStorage on the corresponding
>> IID_IShellItem. But it doesn't look as though the pywin32
>> com stuff quite supports that yet. Could be wrong. Might
>> be worth trying with comtypes; I'll have a look if I can.
>>
>
> OK, more useful version now up; reads JPEGs, WMVs, etc.
> Still more work to be done, reverse-engineering the FMTID
> and property names, but at least it takes you further without
> too much extra work.
>
>
> http://timgolden.me.uk/python/win32_how_do_i/get-document-summary-info.html
>
> TJG
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>

Hi Tim,

Thanks for your help; I am able to get required properties from jpg files.

-- 
Cheers,
Vishwajeet
http://www.singhvishwajeet.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20090522/1115fed8/attachment.htm>


More information about the Tutor mailing list