Dim BR As System.IO.BinaryReader = New System.IO.BinaryReader(System.IO.File.Open(strFileName, System.IO.FileMode.Open))
Dim BW As System.IO.BinaryWriter = New System.IO.BinaryWriter(System.IO.File.Open(strFileName, System.IO.FileMode.CreateNew))
Const conChunkSize As Integer = 10240
Dim intFileSize As Integer = 100000
Dim intChunks, intRemainder, i As Integer, bBytes(conChunkSize - 1) As Byte
intChunks = Int(intFileSize / conChunkSize)
intRemainder = intFileSize Mod conChunkSize
For i = 1 To intChunks
bBytes = BR.ReadBytes(conChunkSize)
BW.Write(bBytes)
Next
bBytes = BR.ReadBytes(conChunkSize)
BW.Write(bBytes)
BW.Flush()
BW.Close()
BR.Close()