• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 350
  • Last Modified:

How to zip and unzip files

Hi

  Could someone advice me on how I could zip and unzip files using VB.
Some code samples would be very helpful.

Thanx
0
b3cf
Asked:
b3cf
1 Solution
 
b3cfAuthor Commented:
Hi

Thanx a lot for the link. But this is too complex. All i need is to specify
a bunch of files, a zip file name and zip it.

And specify a zip and unzip it.

Thanx
0
 
Anthony PerkinsCommented:
You can call WinZip (if it is installed) with command line parameters to do all you need.

See here for more info:
http://www.winzip.com/wzcline.htm

Anthony
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
gencrossCommented:
You can also call pkzip and pkunzip (DOS apps).  They are small (about 24k each) so easy to distribute without having to install anything.  If you do not have them do a search on the web for PKZIP or PKUNZIP and you should be able to find them easily.  I have them as well if you would like, let me know.  You could call them using Shell:

sFileName = "c:\zips\zipme.txt"
shell "c:\pkzip.exe " & sFileName

Hope this helps.
0
 
Richie_SimonettiIT OperationsCommented:
gencross, you will miss long filenames.
0
 
gencrossCommented:
Richie, didn't think about that:)

thanks
0
 
Richie_SimonettiIT OperationsCommented:
Yeah, s**** happens all the time :)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now