I did this simple code with the latest version of the library DotNetZip, for some reason when I add a file I get all the folder structure. For example if I add: C:\one folder\two folders\File.doc Inside the zip file I will have one folder\two folders\File.doc But my expected result would be to have just the file.doc This is my code, I don't know if I am doing something wrong or what..:
//C#
public static void MethodOne(string PathInput, int LimitKb=0, bool DeleteInput=false)
{
using (ZipFile zip = new ZipFile())
{
//add file to zip
zip.AddFile(PathInput);
//save it
zip.Save(PathInput + ".zip");
}
}
Thanks! :)