Add directories to root of Zip folder Ionic Zip c#
Posted
by
Movieboy
on Stack Overflow
See other posts from Stack Overflow
or by Movieboy
Published on 2012-11-24T04:59:42Z
Indexed on
2012/11/24
5:03 UTC
Read the original article
Hit count: 269
c#
I asked this a few months ago, and only received one response which didn't work. I've been tinkering with it for the past few weeks, and I'm still completely lost, so I would appreciate anyone else's input as I'm all out of ideas. what I'm trying to do is add a list of folders and files all to the root of my Zip file, using the Ionic Zip library (c#).
Here's what I have so far
string k = "B:/My Documents/Workspace";
private void button1_Click(object sender, EventArgs e)
{
using (ZipFile zip = new ZipFile())
{
//add directory, give it a name
zip.AddDirectory(k);
zip.Save("t.zip");
}
}
Now, I want my zip to be looking like this.
t.zip -Random Files and Folder
But it's looking like this.
t.zip -t (folder) -Random files and folders Any help would be appreciated, Thank you.
© Stack Overflow or respective owner