Link to home
Start Free TrialLog in
Avatar of Dconter
Dconter

asked on

How do I Create ZIP files with VB

I have a small VB program that compares the contents of two different directories.  If a file from Dir1 is newer that a file in Dir2 then the file in dir2 is moved to an archive folder, and replaced with the newer file.
Once this program is finished, I have to manully zip up all the old files for storage and possible retrieval later on.
I would like to create the zip file on the fly, and then zip and send the older files to this newly created zip file through code.
Can anyone help me out with this?
Avatar of dbrunton
dbrunton
Flag of New Zealand image

http://www.polarsoftware.com/products/zip/sampleprojects.asp

This one costs but other zip dlls do exist and which are free.

ASKER CERTIFIED SOLUTION
Avatar of iozturk
iozturk
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Have a look here:

http://www.vbaccelerator.com/codelib/zip/zip.htm 

Provided a new version of the Info-ZIP Zip32.DLL with encryption code compiled in. This enables you to create password-protected ZIP files.

Here is a full sample program:

http://www.vbaccelerator.com/home/VB/Code/Libraries/Compression/Zipping_Files/VB6_Zip_Sample_Project.asp