Reputation: 46322
say if I have the following:
using (ZipFile zip = new ZipFile())
{
zip.AddFile("C:\\ReadMe.txt");
zip.AddFile("C:\\7440-N49th.png");
zip.AddFile("C:\\2008_Annual_Report.pdf");
zip.Save("C:\\Files\\ZipFiles\\Test.zip");
}
What I am confused on is that when I open up the zip file, I it goes to C: first then I have to click on Files then I have to click on ZipFiles to see what is in the zip file.
Why doesn't it just open up the files I added when I click on the zip file?
Upvotes: 0
Views: 214
Reputation: 31206
are you using DotNetZip? and do you mean you want to add the files to the root of the zip file? If so, maybe you're trying to do
zip.AddFile("C:\\ReadMe.txt", "");
with the second string being the path you add it to in the zip(empty string if root).
Upvotes: 1