[Ask for help]Problems when reading metadata of Office files

Started by GerryLu, September 07, 2016, 04:46:34 AM

Previous topic - Next topic

GerryLu

Hi,

I'm learning to use exiftool to read metadata of Office file. And recent days I got a problem:

When I was reading metadata of docx,pptx, or xlsx files, in Windows, I used version 10.19 of  exiftool.exe,and here are the results:

ExifTool Version Number         : 10.19
File Name                       : ccc.docx
Directory                       : .
File Size                       : 106 kB
File Modification Date/Time     : 2016:08:31 17:49:20+08:00
File Access Date/Time           : 2016:09:05 15:48:50+08:00
File Creation Date/Time         : 2016:09:05 15:48:50+08:00
File Permissions                : rw-rw-rw-
File Type           : DOCX
File Type Extension             : docx

But in CentOS,I used version 8.50 which is installed with yum, version 10.10 and the latest version 10.25, the result was diffrent:

File Type                       : ZIP
File Type Extension             : zip
MIME Type                       : application/zip
...........

Why the docx,pptx,xlsx file will be treated as ZIP file?

Sorry for the grammar error I may made, I'm not good at English, hope you can understand it.

Phil Harvey

My guess is that Archive::Zip is not installed on your CentOS system.  ExifTool must be able to open the ZIP file to be able to recognize a DOCX file.  (They are just a special type of ZIP file.)

See the README file for more information.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

GerryLu

Thank you very much! My problem has been solved!

I saw the warning about Archive::Zip in the exiftool result after reading your answer.

yum install perl-Archive-Zip

Great!