Announcement

Collapse
No announcement yet.

Read File Headers

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hubert Brandel
    replied
    do you want to know how to open a file binery ?

    Code:
    nH = freefile
    open cFilename FOR binary ACCESS read AS #nH
    GET$ # nH, 100,cString
    close # nH
    now you have the first 100 Bytes in cString. Maybe you need less or more, but you have to get the info (spec.) about every needed fileheader to compare with cString.

    Leave a comment:


  • Mark A Nelson
    replied
    How would I read the file in to do the match?

    Leave a comment:


  • Hubert Brandel
    replied
    Hi,

    you can open a file in binary read only and read the bytes you need.
    Here you can find a lot of file format definitions:

    http://www.wotsit.org/

    Leave a comment:


  • Michael Mattias
    replied
    Marco Pontello's "TrID" product described in this current thread?
    http://www.powerbasic.com/support/pb...ad.php?t=36962

    Leave a comment:


  • Mark A Nelson
    started a topic Read File Headers

    Read File Headers

    How Determining the type of file through header info. I want to be able to read a files header and say thats a jpg, gif, png etc... Even if the file name is something else then name.jpg or name.gif
Working...
X