AutoIt
AutoIt
Split File into Chunks
Demonstrates how to split a file into chunks.Chilkat AutoIt Downloads
Local $bSuccess = False
$oFac = ObjCreate("Chilkat.FileAccess")
; Any type of file may be split. It doesn't matter if it's
; a binary file or a text file.
Local $sFileToSplit = "qa_data/hamlet.xml"
Local $sPartPrefix = "hamlet"
Local $sPartExtension = "part"
Local $iMaxChunkSize = 50000
Local $sDestDirPath = "qa_output"
; Splits hamlet.xml into hamlet1.part, hamlet2.part, ...
; Output files are written to the current working directory.
; Each chunk will be 50000 bytes except for the last which
; will be the remainder.
$bSuccess = $oFac.SplitFile($sFileToSplit,$sPartPrefix,$sPartExtension,$iMaxChunkSize,$sDestDirPath)
If ($bSuccess = True) Then
ConsoleWrite("Success." & @CRLF)
Else
ConsoleWrite($oFac.LastErrorText & @CRLF)
EndIf