Split file attachment if they exceed size limit

  • Hi

    I’ve developed a package where I loop through files from a specific path and send them as an attachment per location, each location has it’s own email address where the files are sent to. The file size attachment limit should be less than 8MB per each location, if the total attachments is greater than 8MB i want to be able to split the files, e.g group the files in smaller sizes then send the emails to it's location.

    Thanks

  • What would you expect to happen if you had a single file with a size of 8MB or more? Could that happen? if so, how would you expect to split a file like an image or a PDF?

     

    If not, you'll likely need to use a scripting task to achieve this, and "inspect" the files size, keeping a running total. If the current file would "tip" the email over 8MB send the "current" email, and then start another from that file (and repeat).

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hi Thom

    Thanks for the response, it's unlikely i'll have a single file which is greater than 8MB because the database where i've downloaded the files from doesn't allow a sigle file of that size.

    So far, where the total size is greater than 8MB i'm creating a folder where i'm moving them those files i've grouped them into the desired location, now i need a way to loop through those folders and send then in sizes.

    thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply