Option Explicit
Const adTypeBinary = 1
Const adTypeText = 2
Const adSaveCreateOverWrite = 2
Dim objStream, objStream2, strFile, strFile2, binData, binData2
Set objStream = CreateObject("ADODB.Stream")
Set objStream2 = CreateObject("ADODB.Stream")
strFile = "1.bin"
strFile2 = "2.bin"
objStream.Open
objStream.Type=adTypeBinary
objStream.LoadFromFile(strFile)
binData = objStream.Read()
objStream.Position = objStream.Size
objStream2.Open
objStream2.Type=adTypeBinary
objStream2.LoadFromFile(strFile2)
binData2 = objStream2.Read()
objStream.Write(binData2)
objStream.SaveToFile("merge.bin")
objStream.Close
objStream2.Close
Title:
VBS - Merge binary files
Description:
Option Explicit Const adTypeBinary = 1 Const adTypeText = 2 Const adSaveCreateOverWrite = 2 Dim objStream, objStream2, strFile, strFile...
...
Rating:
4