Solved

How to zip and unzip files

Posted on 2002-05-23
7
345 Views
Last Modified: 2010-05-02
Hi

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

Thanx
0
Comment
Question by:b3cf
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 18

Accepted Solution

by:
bobbit31 earned 50 total points
ID: 7029932
0
 

Author Comment

by:b3cf
ID: 7029950
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
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 7029974
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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 4

Expert Comment

by:gencross
ID: 7030017
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
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7030067
gencross, you will miss long filenames.
0
 
LVL 4

Expert Comment

by:gencross
ID: 7031798
Richie, didn't think about that:)

thanks
0
 
LVL 16

Expert Comment

by:Richie_Simonetti
ID: 7033813
Yeah, s**** happens all the time :)
0

Featured Post

Technology Partners: 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!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question