Přidat otázku mezi oblíbenéZasílat nové odpovědi e-mailem Kopírování ze složky do složky

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

Reakce na odpověď

1 Zadajte svou přezdívku:
2 Napište svou odpověď:
3 Pokud chcete dostat ban, zadejte libovolný text:

Zpět do poradny