From: Austin Ziegler Date: 2005-06-02T05:33:52+09:00 Subject: Re: Document identification On 6/1/05, Ilmari Heikkinen wrote: > ke, 2005-06-01 kello 19:00, M. Eteum kirjoitti: > > Dear Ruby Guru: > > Is there a way to identify any documents from its header? I have a > > bunch of document collected over the year from multi platform system, > > Mac, Windows, and various unix/linux variant where some of the document > > does not have file extension. Are there a list that tells us what header > > should we expect for certain documents e.g. txt, rtf, pdf, jpg, mpg, > > word, excel, visio, etc ... > > > > Thanks Most of this is covered by MIME::Types on RubyForge. However, the OP indicated that the problem was related to NOT having proper filename extensions. The OP wants to look for magic numbers and strings. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca