Compressing a folder on a network path using DotNetZip

Nov 13, 2013 at 7:14 AM
I am not sure if its a gap in my understanding. I have to zip a folder which sits on a server in the same network. Suppose I have a folder WebSite on the D drive of ABC machine on XYZ domain (same network as my machine). I use the following code to zip it
            using (ZipFile myZip = new ZipFile())
            {
                myZip.AddSelectedFiles("*.*", @"\\ABC.XYZ.com\d$\WebSite\", true);

                myZip.Save(@"\\ABC.XYZ.com\d$\Test.zip");
            }
Using this code I get an archive in the D drive of the server ABC but, the structure of the zip would look like this.
Test.zip -> ABC.XYZ.com -> d$ -> Website
Is there some alternative way to get the Zip file like Test.zip -> Website, while on a network path.
Nov 15, 2013 at 5:41 AM
I posted the same question in SO.. I got an answer from there. I just had to add the entire directory to the zip file
using (ZipFile myZip = new ZipFile())
{
    myZip.AddDirectory(@"\\ABC.XYZ.com\d$\WebSite\", "WebSite");
    myZip.Save(@"\\ABC.XYZ.com\d$\Test.zip");
}
Thanks a bunch elgonzo