DotNetZip Save location
12,800
Change the path in your save method or at time of declaration.
ZipFile zip = new ZipFile("C:\\MyFile.Zip");
or
using (ZipFile zip = new ZipFile())
{
// add this map file into the "images" directory in the zip archive
zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images");
// add the report into a different directory in the archive
zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files");
zip.AddFile("ReadMe.txt");
zip.Save("C:\\MyZipFile.zip");
}
for more help DotNetZip
Author by
BjarkeCK
Updated on June 04, 2022Comments
-
BjarkeCK almost 2 years
Moin!
using (ZipFile zip = new ZipFile()) { // add this map file into the "images" directory in the zip archive zip.AddFile("c:\\images\\personal\\7440-N49th.png", "images"); // add the report into a different directory in the archive zip.AddFile("c:\\Reports\\2008-Regional-Sales-Report.pdf", "files"); zip.AddFile("ReadMe.txt"); zip.Save("MyZipFile.zip"); }
This example stores the MyZipFile.zip in "C:\Program Files (x86)\IIS Express", i can't find any simple examples on the net Is there any way to change that path? i doubt i have permissions to go there on my webhost.