Why am I unable to unzip the zipped file? Well, the script ran fine and there was no exception error of any sort. So, when the script is done, I see no files in the sTmpDirPath directory… Why? What can you do to make it work?
–snip– sTmpDirPath = “C:\folder1”;
//License for the use of the Xceed’s components… Xceed.Zip.Licenser.LicenseKey = “####-####-####-####”;
//Initialize variables… string sZipFilePath = sTmpDirPath + “\\” + “test.zip”; Xceed.FileSystem.DiskFile oDiskFile = new Xceed.FileSystem.DiskFile(sZipFileName); Xceed.Zip.ZipArchive oZipArchive = new Xceed.Zip.ZipArchive(oDiskFile); Xceed.FileSystem.DiskFolder oDiskFolder = new Xceed.FileSystem.DiskFolder(sTmpDirPath);
Ah! That’s what the problem is. It’s my first time writing the script that deal with extracting the zip file as I had never done it before. Took me a while to find an example code, so I thought I did something wrong.
I did a file search on my machine and it could not find the file. I wonder why it didn’t raise the exception error if you use a filename without a full file path. This is with the latest Xceed version I downloaded today.
Imported from legacy forums. Posted by fletchsod (had 3772 views)