Finding file details...

Kalibr space.captain.face at gmail.com
Thu May 29 21:31:05 EDT 2008


On May 30, 1:41 am, "Roger Upole" <rup... at hotmail.com> wrote:
>
> You can use the shell COM objects to access media properties
> as shown by Explorer.
>
> import win32com.client
> sh=win32com.client.Dispatch('Shell.Application')
>
> folder= r'M:\Music\Bob Dylan\Highway 61 Revisited'
> ns=sh.NameSpace(folder)
>
> ## the column index for Artist may vary from folder to folder
> for c in range(0,255):
>     colname=ns.GetDetailsOf(None, c)
>     if colname=='Artists':  ## This shows up as just Artist on XP
>         for i in ns.Items():
>             artist=ns.GetDetailsOf(i, c)
>             if artist:
>                 print ns.GetDetailsOf(i, 0), artist
>         break
>
>             Roger

I shall give that a go. (is the module you reference this one?
http://python.net/crew/mhammond/win32/Downloads.html )



More information about the Python-list mailing list