Forech Iteration on FileSize List to Obtain a sublist of file of a certain Size

Certified Senior Developer

Given a list of files, having obtained the list of their relative sizes, I have to iterate on the list until I obtain a maximum size (for example 10MB) and from the next file start again with the same process, iterating until the end of the list

  Discussion posts and replies are publicly visible

Parents Reply
  • 0
    Certified Senior Developer
    in reply to Stefan Helzle

    Sure, I have a list of generated documents, which need to be zipped and sent via email. Obviously the mail server as I expect will have its own size limit. Let's pretend that this size is 10MB as a precaution, I should be able to zip (let's assume at 0% compression) groups of 10MB and thus create a series of files that can be sent in single emails. I tried looking for zip plugins that directly allowed file splitting, but I couldn't find any (although in that case the loss of just one of the files would make extraction impossible [generally])

Children