How to spit one zip archive into multiple smaller zip archives

Hello!

I have to split one zip archive into mutiple smaller ones because it’s to large to attach it on outlook mail.
Can this be done with any activity or invoke code?
I try to invoke this code, but i get this error. ‘)’ expected.


Does anyone have any advice?

HI @Andrei_Croitoru

Check your code once again and see if you have missed any closing brackets

Regards
Sudharsan


Still, same error

HI @Andrei_Croitoru

In the second Line You have the extra close bracket

Using (ZipFile zip = New ZipeFile())

Try with curly brasses

Regards
Gokul

okay @Andrei_Croitoru Can you send the code here?

int segmentsCreated ;
using (ZipFile zip = New ZipFile())
{
zip.UseUnicode= True; // utf-8
zip.AddDirectory(@“MyDocuments\ProjectX”);
zip.Comment = "This zip was created at " + System.DateTime.Now.ToString(“G”) ;
zip.MaxOutputSegmentSize = 100*1024 ; // 100k segments
zip.Save(“MyFiles.zip”);

segmentsCreated = zip.NumberOfSegmentsForMostRecentSave ;
}

What is this G format?

@Andrei_Croitoru Do we have a format like this??

Regards
Sudharsan

Nope, But the error remains if i delete it

@Andrei_Croitoru

Try this

int segmentsCreated ;
using (ZipFile zip = New ZipFile())
{
zip.UseUnicode= True; // utf-8
zip.AddDirectory(@“MyDocuments\ProjectX”);
zip.Comment = "This zip was created at " + System.DateTime.Now.ToString(“dd”);
zip.MaxOutputSegmentSize = 100*1024 ; // 100k segments
zip.Save(“MyFiles.zip”);

segmentsCreated = zip.NumberOfSegmentsForMostRecentSave ;
}

Check this for the formats

Regards
Sudharsan

Same error.

Hello Andrei, I have tried the code and encountered the same error as you did, I would like to know have you solved the problem and finally got a worked code? So much appreciated if you may tell me, thank you!