>>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.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)