>>>If anyone has an idea of determining a file type, regardless of file extention, please share it here...
>>>
>>>Types to recognize -
>>>Text
>>>Zip
>>>Bmp
>>>PDF
>>>or none-of-the-above
>>>
>>>TIA
>>
>>To "start" you:
>>
>>BMP start with "BM"
>>ZIP start with "PK"
>>PDF start with "%PDF"
>>TXT start with anything! :-)
>
>TXT can start with anything, but if you find several repetitions of chr(13) + chr(10), say, within the first thousand bytes, then it is very likely a text-file. Well, perhaps you want to exclude other options first, such as HTML files.
>
>Hilmar.
Text start with anything, but should not contain any chars < 32 (except 9,10 and 13).
Of course, XML, HTML, LOG and a lot of others use the same format but with a specific internal structure.
But, the file remain basicaly a text file.
If we exchange an apple, we both get an apple.
But if we exchange an idea, we both get 2 ideas, cool...Gérald Santerre
Independant programmer - internet or intranet stuff - always looking for contracts big or small :)
http://www.siteintranet.qc.ca