[Tutor] Getting file properties on winodws

Tim Golden mail at timgolden.me.uk
Thu May 21 10:13:36 CEST 2009


[Rearranging for reading order]

[vishwajeet singh wrote]
I am trying to read properties of file on windows like there is a
property
call Keywords on file; I am to read this property independent of file
type.

[Tim Golden <mail at timgolden.me.uk> wrote:]
There's an unpolished (indeed, unfinished) example here:
http://timgolden.me.uk/python/win32_how_do_i/get-document-summary-info.html

[vishwajeet singh wrote:]
> It does not seems to be working for jpg and in general with image files any
> pointers on that.

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.

TJG


More information about the Tutor mailing list