Merging Binary Files? Is it possible?
Is it possible to merge two binary files while only using one buffer?
E.G.
Read Stuff into ByteArray BA1
Open File 1
Goto EOF File1
Put BA1 into File 1
Close File1
The problem with this is that VB truncates the last character in File1.
One way it does work is when you read both files into two byte arrays, concatenate the arrays and write this back to the file. But if you want to append 2K to a 32MB file this is ridiculous...
Any ideas?
Thanks,
Rob.
Re: Merging Binary Files? Is it possible?
You can open the target file in Append mode and add the stuff you want to save.
Crazy D @ Work :-)
Re: Merging Binary Files? Is it possible?
However.. when opening in Append Mode.. does VB treat the stream as pure bytes or a Unicode String? This make a diference...