Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET Can I unzip my zip file AFTER I’ve FTP’d it?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #20329 |

    that’s all.

    Imported from legacy forums. Posted by ganders (had 1815 views)

    User (Old forums)
    Member
    Post count: 23064

    Maybe this will help…

     Using Xceed.Zip.QuickZip to create the Zip file.

    Then, using AbstractFolder class doing a CopyFilesTo.

    Once the files are copied, I want to unzip the file.

    Can this be done?

    Imported from legacy forums. Posted by ganders (had 249 views)

    User (Old forums)
    Member
    Post count: 23064

    Ok, I “think” I’ve found the code that is supposed to do the unzipping (from a post on 6/24/2010 by username “Nancy”. Here’s the code:

     [code]Xceed.Zip.QuickZip.Zip(parentFolder + “.zip”, true, true, true, parentFolder + @”\*”);[/code]

    That’s how I create the zip file, next I do a AbstractFolder.CopyFilesTo(…), and here’s the unzip code:

    [code]AbstractFile = destZipFile = destFolder.GetFile(parentFolder + “.zip”);

    Xceed.Zip.ZipArchive za = new Xceed.Zip.ZipArchive(destZipFile);

    za.CopyFilesTo(destFolder, true, true);[/code]

    The problem is, this does not unzip my files, what code is missing? Also, if I go to that server to manually unzip that file to see what it looks like, it contains the ENTIRE directory structure from the source location. Here’s what I mean, my source zip file is located here “C:\temp\test1\blah\file.zip”. That zip file contains 1 folder, with 5 pdfs inside that other folder. So when I unzip, I’m expecting to see {parentFolder} (without the zip extension), then the 1 folder, and inside that the 5 pdfs. But when I do the unzip, it contains the temp folder, then the test1 folder, then blah, then {parentFolder} etc…

    So my first thought was that there is a “preservePaths” property when doing the zip operation, so I’ll change that to false, but when I change it to false [and manually] unzip the file, it just displays the 5 pdfs…

     

    Any help with this would be much appreciated…

    Imported from legacy forums. Posted by ganders (had 316 views)

    User (Old forums)
    Member
    Post count: 23064

    Ok……..

     Well, now I’m able to get it to unzip on the FTP site, but it still contains all of those extra folders like my previous post says…

    Imported from legacy forums. Posted by ganders (had 353 views)

    User (Old forums)
    Member
    Post count: 23064

    I’m entering my “relative path” as “test1\pdfFolder\”. There are about 5 other folders before the folder called “test1”, but when I unzip, it still creates all of those 5 other folders….this is frustrating.

    Imported from legacy forums. Posted by ganders (had 321 views)

    User (Old forums)
    Member
    Post count: 23064

    I’d really appreciate it if ANYONE could chime in here with my problem on the relative path setting. I implemented code to manually “move” the sub folders up to just below the parent to make it seem like the end result was a relative path, but doing that “move” via FTP is EXTREMELY slow. It completely negates the whole purpose in zipping all of my files.

    Imported from legacy forums. Posted by ganders (had 1792 views)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.