For the past two days I have been scanning the Internet to try to find the solution to my problem. I have a folder of different files. They run the gambit of file types. I a
The problem is that there are two ways that Windows stores file metadata. The approach you're using is suitable for files created by COM applications; this data is included inside the file itself. However, with the introduction of NTFS5, any file can contain metadata as part of an alternate data stream. So it's possible the files that succeed are COM-app created ones, and the ones that are failing aren't.
Here's a possibly more robust way of dealing with the COM-app created files: Get document summary information from any file.
With alternate data streams, it's possible to read them directly:
meta = open('myfile.ext:StreamName').read()
Update: okay, now I see none of this is relevant because you were after document metadata and not file metadata. What a difference clarity in a question can make :|
Try this: How to retrieve author of a office file in python?