How to access a file’s properties on Windows?

Here is a function which reads all file attributes as a dictionary: import win32api #============================================================================== def getFileProperties(fname): #============================================================================== “”” Read all properties of the given file return them as a dictionary. “”” propNames = (‘Comments’, ‘InternalName’, ‘ProductName’, ‘CompanyName’, ‘LegalCopyright’, ‘ProductVersion’, ‘FileDescription’, ‘LegalTrademarks’, ‘PrivateBuild’, ‘FileVersion’, ‘OriginalFilename’, ‘SpecialBuild’) props = {‘FixedFileInfo’: None, ‘StringFileInfo’: None, ‘FileVersion’: None} try: … Read more