Solved

How to zip and unzip files

Posted on 2002-05-23
7
337 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
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
Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA saving file message display 5 67
Best way to parse out a json string in VB6? 10 171
message box in access 4 46
how to know if my Checkbox is True in VB6.0? 9 55
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
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…

810 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