How to remove the path out?

Jun 30, 2009 at 12:32 PM

I have the following codes (simplied) to add a flie to zip:


using (ZipFile zip = new ZipFile("MyZip.zip")
{
     zip.AddFile("c:\temp\test\test.log");
}


The result in the zip file is a file (test.log) with path. If I only want to add this file without path in the zip file, how can I do it. Should I rename it with path or any option to let ZipFile to ignore file path?

Coordinator
Jun 30, 2009 at 1:39 PM
    zip.AddFile(@"C:\temp\test\test.log", "");