Sample code for 30+ languages & platforms
DataFlex

Reassemble a Previously Split File

Demonstrates how to reassemble a previously split file.

Chilkat DataFlex Downloads

DataFlex
Use ChilkatAx-win32.pkg

Procedure Test
    Boolean iSuccess
    Handle hoFac
    String sReassembledFilename
    String sPartPrefix
    String sPartExtension
    String sSrcDirPath
    String sTemp1

    Move False To iSuccess

    Get Create (RefClass(cComCkFileAccess)) To hoFac
    If (Not(IsComObjectCreated(hoFac))) Begin
        Send CreateComObject of hoFac
    End

    // Any type of file may be reassembled.  It doesn't matter if it's
    // a binary file or a text file.
    Move "hamlet2.xml" To sReassembledFilename

    Move "hamlet" To sPartPrefix
    Move "spl" To sPartExtension
    Move "." To sSrcDirPath

    // Reassembles the original file from hamlet1.spl, hamlet2.spl, ...
    Get ComReassembleFile Of hoFac sSrcDirPath sPartPrefix sPartExtension sReassembledFilename To iSuccess

    If (iSuccess = True) Begin
        Showln "Success."
    End
    Else Begin
        Get ComLastErrorText Of hoFac To sTemp1
        Showln sTemp1
    End



End_Procedure