This project is read-only.

Unzip on Remote Drive?

Aug 17, 2010 at 11: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 11: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 4: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\\";
            //String ZipToUnpack = "Z:\\Inetpub\\ftproot\\";
            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 2: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".