We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

compression to zip file

Thread ID:

Created:

Updated:

Platform:

Replies:

114909 Dec 13,2013 10:21 AM UTC Jan 31,2014 04:47 AM UTC Windows Forms 7
loading
Tags: PDF
Sylvie Chevojon
Asked On December 13, 2013 10:21 AM UTC

Hello
We used the syncfusion.compression dll to compress files.
But we need to keep the folder name in the zip file ? is it possible ?
Thanks lot

Sylvie



Praveenkumar H [Syncfusion]
Replied On December 20, 2013 04:36 AM UTC

Hi Sylvie,

Thank you for using Syncfusion products,

Yes we can keep the folder name in zip file . 
the sample project is attached for your reference.

Please let us know if you need further assistance.

With Regards,
Praveen


Syncfusion_compression_4f64b7d2.zip

Sylvie Chevojon
Replied On December 23, 2013 01:31 PM UTC

Hello,
Thanks lot for your answer but I think my question is not enough detailed.
I need to zip many files in the same zip file but with the Folder name.
For exemple, I attached a exemple of zip file that I need.
We are able to add many files in a zip and able to create a directory in a zip but we don't know how we can insert a/many file in the directory of the zip file.

Thanks lot and merry christmess


Properties_7fcdc9c4.zip

Praveenkumar H [Syncfusion]
Replied On January 2, 2014 04:08 AM UTC

Hi Sylvie,

Thank you for your update,

We are not able to download the attachment due to file server maintenance.
Please resend the attachment.

Please let us know if you need further assistance.

With Regards,
Praveen


Sylvie Chevojon
Replied On January 8, 2014 09:19 AM UTC

Please find attached an exemple of zip file

Backup_131128_1707_f4031493.zip

Geetha M [Syncfusion]
Replied On January 17, 2014 05:19 AM UTC

Hi Sylvie,

Sorry for the delay.

Yes, you can insert file in the zip and save it as a new zip file. Here is the code snippet:

ZipArchive zip = new ZipArchive();
zip.Open(@"C:\Backup_131128_1707_f4031493.zip");
StreamReader reader = new StreamReader(@"C:\Solinium2.config");
zip.AddItem(@"Methods\Solinium2.config", reader.BaseStream, false, FileAttributes.Archive);
zip.Save("Test.zip", true);

Please try this and let me know if you have any other questions.

Regards
Geetha

Sylvie Chevojon
Replied On January 27, 2014 02:03 PM UTC

Ok Thanks lot.

Praveenkumar H [Syncfusion]
Replied On January 31, 2014 04:47 AM UTC

Hi Sylvie,
    
Thank you for your update,
Please let us know if you need any further assistance

With Regards,
Praveen

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;