ExifTool Forum

General => Metadata => Topic started by: GerryLu on September 07, 2016, 04:46:34 AM

Title: [Ask for help]Problems when reading metadata of Office files
Post by: GerryLu on September 07, 2016, 04:46:34 AM
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.
Title: Re: [Ask for help]Problems when reading metadata of Office files
Post by: Phil Harvey on September 07, 2016, 07:14:26 AM
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
Title: Re: [Ask for help]Problems when reading metadata of Office files
Post by: GerryLu on September 08, 2016, 11:27:53 PM
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!