Link to home
Start Free TrialLog in
Avatar of Ghanisen
Ghanisen

asked on

Zip and unzip a file from a VB.NET application

Hi,

I have an empty zipped Access database in the Folder where my VB.NET application is located. Thsi database serves to create other databases by copying it to the required folders.

I'd like the application to copy it to a specific folder and unzip it there so that the user can store his data.

My problem is how to unzip the file.


On the other hand I want to be able to zip files and folders for backup purposes.


In this case my problem is how zip the files from within my VB.NET app.

Any help shall be greatly appreciated

Avatar of danths
danths
Flag of United States of America image

To zip and unzip you would need third party libraries ( you can write from scratch as well but no point).
http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx

The above link has very good examples and the library it self is opensource with no tags attached. I have used this on multiple occasions and works great. You could laso called native binaries like pkzip but a library integrates much better than out of process model.
ASKER CERTIFIED SOLUTION
Avatar of iboutchkine
iboutchkine

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SubSonicS
SubSonicS

Hi, i know this post is closed, but i have a better way...i'm using it within my apps...

Simple use the FREE Expand.exe within Microsoft Windows...
You can find an easy way to execute it within your application....

It is very stable and it will compress your files fast and totally secure...

To be Know: The version of expand.exe of Win98/me is different from the one shipped with Nt/XP/2003...

I simple used all two inside my app and i use the appropriate one after a check of the installed OS..

Hope this help to be more FREE then use WinZip(A little question, how can you know if WinZip will be installed on the user machines?)

Sorry for my bad English, i'm Italian...
P.S. Naturally expand.exe does not create "Zip" files, but "Cab" files which have the same properties of compression....

;)