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