How to zip multiple Folder into single ZipFile?

@Arvin_Gabriel_Mari_A
@badita
@vvaidya
@aksh1yadav

I have folder as “sample” inside that i have no.of sub folder.
I need to compress all the sub folder into one zip file ( Zip file format is “Source EOD dd-mm.zip” )
Can someone help to achieve this

1 Like

I can able to read all the sub folders but i am not able to zip those sub folders into one Zipfile

Syntax to use zip folder ==> ZipFile.CreateFromDirectory(sourcepath,zipPath,CompressionLevel.Fastest)

Is this right way i am using to zip those folders or any other way to do this

please suggest me how to do this

Thanks in advance
Jothyprasanth M

1 Like

ZipFile.CreateFromDirectory should work.

Open your xaml in notepad and add below manually.

[/uploads/default/original/2X/8/8116f8ee3b8c0b0645367f6735018b1ea60bee93.png]

[/uploads/default/original/2X/f/f1e0ee1ebd527d338208f547a858d0b53dd6b83d.png]

[/uploads/default/original/2X/6/6a4dcb4ecc6644c6d86469b2ab2bf9ef10a5ab18.png]

<AssemblyReference>System.IO.Compression.FileSystem</AssemblyReference>

CompressFolders.xaml (5.96 KB)

3 Likes

Its working fine Thatnk you for giving me the solution

Is it possible to create zipfile using password too?

Is it possible to create Zip file using password?

With System.IO.Compression you can not set a password, acording to this:

1 Like

Hi @vvaidya and @jothyprasanth.m

When I tried the solution XMAL it is working fine , but once I linked it with my solution , same error occurred.

I need to add only Assembly or other below 3 lines as well

[/uploads/default/original/2X/8/8116f8ee3b8c0b0645367f6735018b1ea60bee93.png]

[/uploads/default/original/2X/f/f1e0ee1ebd527d338208f547a858d0b53dd6b83d.png]

[/uploads/default/original/2X/6/6a4dcb4ecc6644c6d86469b2ab2bf9ef10a5ab18.png]

Hi vvaidya,

How to create multiple folder into a single file, Thanks

1 Like

Hi @Sharanabasava,
I thank to you to initiate me to give new provision in the zip file activity. Now you can able to do zip with multiple folders.

Regards
Balamurugan

2 Likes