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
b3cfAsked:
Who is Participating?
 
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
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.