How to access file metadata using Python?

I am trying to write a python program that retrieves and updates file metadata in windows. I tried to find on Google which modules to use, but I did not find anything specific or useful.

Some people have suggested a stat module that can provide you with information such as file access and the latest modification. But I'm looking for other types of metadata available on Windows. For example, tags, author, rating, artists, etc.

How can I get this information for a file using Python?

thanks

+4
source share
1 answer

Essentially, as I said here less than an hour ago,

Apparently, you need to use the Windows Search System.Keywords search API - you can access the API directly through ctypes or indirectly (win32 extension is required) through the COM Interop API. Sorry, I do not have a vista installation on which check, but I hope these links are useful!

Links are not saved when copying and pasting, just go to other SO questions for them :-).

+2
source

All Articles