Solved

How to zip and unzip files

Posted on 2002-05-23
7
342 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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

738 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