Home › Forums › .NET libraries › Xceed Zip & Real-Time Zip for .NET › QuickZip – Unzip and rename the extracted file on fly!
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!
Imported from legacy forums. Posted by webchetan (had 3485 views)
You will need to use the FileSystem classes to do this. This is a way of unzipping files other than QuickZip.
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)