understand program used to create file

alex23 wuwei23 at gmail.com
Tue Nov 1 23:22:57 EDT 2011


On Nov 2, 5:27 am, pacopyc <paco... at gmail.com> wrote:
> Hi, I have about 10000 files .doc and I want know the program used to
> create them: writer? word? abiword? else? I'd like develop a script
> python to do this. Is there a module to do it? Can you help me?

Word documents store metadata inside of them, one field of which is
the program used to create them. This shows you how to use pywin32 to
access them:

http://www.galalaly.me/index.php/2011/09/use-python-to-parse-microsoft-word-documents-using-pywin32-library/

This won't be a foolproof solution, unfortunately. A random
examination of doc files shows that not all of them have the required
field set.



More information about the Python-list mailing list