Unzip on Remote Drive?

Aug 17, 2010 at 10:30 PM


Is it possible to unzip a file on a mapped drive?  I've tried using UNC and the mapped drive letter in the "Extract" call, but nothing happens.

Thanks in advance!

Aug 20, 2010 at 10:49 AM
Yes, it's quite possible. Show your code and maybe we can help explain what is happening. Often, c# developers forget to double the backslashes in strings and this can cause problems when trying to extract to full pathnames.
Aug 20, 2010 at 3:59 PM

Hi Cheeso,

Thanks for the reply.  My code is as follows:

        public static void unzipFiles()
            //Neither of these work
            //String ZipToUnpack = "\\<ftpServer IP>\\Inetpub\\ftproot\\web237.zip";
            //String ZipToUnpack = "Z:\\Inetpub\\ftproot\\web237.zip";
            String TargetDir = "Z:\\Inetpub\\ftproot\\WEB237";

            using (ZipFile zip2 = ZipFile.Read(ZipToUnpack))
                foreach (ZipEntry e in zip2)
                    e.Extract(TargetDir, ExtractExistingFileAction.OverwriteSilently);


Aug 22, 2010 at 1:36 AM
What is contained in the zip file? Is it possible that the zip is empty? A zip with No entries? You need to be more specific about what you mean by "nothing happens".