Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Split file into smaller Files

tj29tj29 Posts: 45Member
Does anyone has a routine or know where i can find some guidence on how i can split a large file into smaller files.

thanks.

Comments

  • zibadianzibadian Posts: 6,349Member
    : Does anyone has a routine or know where i can find some guidence on how i can split a large file into smaller files.
    :
    : thanks.
    :
    Open the source file as an untyped file. Then copy a set number of bytes into another file. Continue this until the block is smaller than that set number. Then copy the remainder of the file into the last file.
    Reassembling the original file is equally simple. Create a new empty file, and open the first file and copy it in the new file. Then close it and open the next part, and copy it into the larger. Repeat this unit you reach the last part. Finally close the new file and you should have the original.
  • _yilmaz_yilmaz Posts: 150Member
    You can use TFileStream or TMemoryStream components for this purpose.

    : Does anyone has a routine or know where i can find some guidence on how i can split a large file into smaller files.
    :
    : thanks.
    :

Sign In or Register to comment.