I am convert File to zip file After That file stored Response.outputstream wise stored zib file in Download path only,so i don't want That Result. I want Selected folder path only stored convert file in C# My Source Code is Below
using (ZipFile zip = new ZipFile()) { zip.AlternateEncodingUsage = ZipOption.AsNecessary; zip.AddDirectoryByName("Files"); foreach (GridViewRow row in GridView1.Rows) { if ((row.FindControl("chkSelect") as CheckBox).Checked) { string filePath = (row.FindControl("lblFilePath") as Label).Text; zip.AddFile(filePath, "Files.zip"); } } Response.Clear(); Response.BufferOutput = false; string zipName = String.Format("Zip_{0}.zip", DateTime.Now.ToString("yyyy-MMM-dd-HHmmss")); Response.ContentType = "application/zip"; Response.AddHeader("content-disposition", "attachment; filename=" + zipName); zip.Save(Response.OutputStream); Response.End(); }
How to stored selected Folder in this above source code.
Example:
Convert zip file stored in this path:E:\convertZibsourcecode\ZIPFILE\zipa
Thanks