Link to home
Start Free TrialLog in
Avatar of Ryan Chong
Ryan ChongFlag for Singapore

asked on

Using Winzip in VB

How can i use VB to zip some files/ folders, then unzip it into original format? Thanks.
Avatar of vbyuval
vbyuval

Hi ,

I have full code for that if you want it ( or anybody else here ) send me mail to yuvala@ladpc.co.il and I will send you the code .
if you go to winace.com you can get a free dll that allows you to zip/unzip, use rar files, arj files and lots of others
ASKER CERTIFIED SOLUTION
Avatar of glass_cookie
glass_cookie

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
Here's another one:

View...
http://www.planetsourcecode.com/xq/ASP/txtCodeId.11749/lngWId.1/qx/vb/scripts/ShowCode.htm

Description: Unzip a zipped file from within an application

That's it!

glass cookie : )
And another one (source code):

Download...
http://www.planetsourcecode.com/upload/ftp/CODE_UPLOAD176483282001.zip

Description: I always missed it in WinZip: Unzip all files in a directory to the same directory. Modify it, so the target directory can be at another place.

That's it!

glass cookie : )
Hello

  I post answer for an activex to compress and decompress zip files you can see the the answer in this link

https://www.experts-exchange.com/jsp/qShow.jsp?ta=visualbasic&qid=20105331


Mohammed
c = Shell("d:\temp\pkunzip.exe d:\temp\t001015.zip d:\temp", vbHide)


'========another way========
' Inputs:'Example:
'source = app.path & "source.exe"
'target = app.path & "target.zip"
'zip = true (compress)
'zip = false(uncompress)



Function winZipit(ByVal source As String, ByVal target As String, ByVal zip As Boolean)
    zipIT = App.Path & "winzip32 -a"
    unzipIT = App.Path & "winzip32 -e "


    If zip = True Then
        Shell (zipIT & target & source)
    Else: Shell (unzipIT & target & source)
    End If
End Function
Here are the free libraries fom VBAccelerator

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

and

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

Good Luck

Ajay Chadha ... :-)
iboutchkine, you should have problem with large filenames.
Avatar of Ryan Chong

ASKER

Sorry guys for the delay, it's time to PAQ this question. Thanks.
Thanks for the grade! : )