Home Forums .NET libraries Xceed Zip & Real-Time Zip for .NET QuickZip – Unzip and rename the extracted file on fly!

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

    How can I Unzip files from a “.zip” file and rename it while unzipping.

    In short when unzipping the files how can I rename extracted files?

    Also is QuickZip is the only way to Unzip the files?

    Any help would be appreciated!

    Thank you!

    Imported from legacy forums. Posted by webchetan (had 3485 views)

    User (Old forums)
    Member
    Post count: 23064

    You will need to use the FileSystem classes to do this. This is a way of unzipping files other than QuickZip.

    e.g. :

    AbstractFile archive = new DiskFile( @”D:\temp\temp.zip” );
    AbstractFile zippedFile = new ZippedFile( archive, “test.txt” );
    AbstractFile destination = new DiskFile( @”D:\temp\tempRenameFile.Txt” );
    zippedFile.CopyTo( destination, true );

    We have a sample explorer that shows how to do use the FileSystem classes.

    Go to Start Menu -> All Programs -> Xceed Components -> Our components in action! -> Xceed FileSystem Snippet Explorer.

    Then click on topic “3. Zip capabilities”. In the sub topics, you can look at the C# or VB.NET code, you can execute it, and you can even modify the code and execute it after!

    Imported from legacy forums. Posted by André (had 3340 views)

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