Are you saying that the file looks like:
Header - 63 Bytes - required always this size
Detail - unknown amount of bytes
Trailer - 395 bytes - required always this size
If yes
Code:Dim b(1023) As Byte Dim fs As New FileStream("c:\foo.txt", FileMode.OpenOrCreate) Dim trlr As Long = fs.Length - 395 fs.Seek(0, SeekOrigin.Begin) fs.Read(b, 0, 63) fs.Seek(trlr, SeekOrigin.Begin) fs.Read(b, 0, 395) fs.Close()




Reply With Quote