obecně to máš tady:
https://www.mjtnet.com/forum/viewtopic.php?t=1170
Sub CopyNBytes(SourceFile,DestFile,Bytes)
Const adTypeBinary = 1
Const adSaveCreateOverWrite = 2
Dim BinaryStream
'Create the BinaryStream object
Set BinaryStream = CreateObject("ADODB.Stream")
'Set it up and load in the source file
BinaryStream.Type = adTypeBinary
BinaryStream.Open
BinaryStream.LoadFromFile SourceFile
'Truncate the stream
BinaryStream.Position = Bytes
BinaryStream.SetEOS
'Save the stream to the destination file
BinaryStream.SaveToFile DestFile, adSaveCreateOverWrite
End Sub
A celé to budeš volat v cyklu nad všemi soubory, které chceš takto vymandlovat:
CopyNBytes,cesta\zdroj.txt, cesta\cil.txt, 558