Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Header information in MS Office files

0 views
Skip to first unread message

Vikas Manghani

unread,
Jan 14, 2008, 6:13:05 AM1/14/08
to
Hi
I have an application where files are dropped into a folder which is
monitored continuously. The files could be pdfs, docs, xls, ppt, zip, gz and
a few more.
I am required to ensure that given a file, the physical file is of the same
type as its extension indicates. In other words, a file named abc.doc is
indeed a Microsoft Word file and not a pdf file which someone has renamed to
doc.

I was able to find header information for all the file types I need except
for MS WOrd, MS Excel and MS Powerpoint. Can anyone tell me if I can read any
file header information for these file types to ascertain their actual type.
Is there any magic number as in Unix?

Thanks in advance
Vikas

0 new messages