Link to home
Start Free TrialLog in
Avatar of Briant
Briant

asked on

Using Winzip command line utility from VB6

Hi,

 I'm stuck trying to work out how use the winzip command line utility (wzcline.exe available at Winzip.com).  

 I've been trying to use the shell command and use wzzip but every combination of commands has given me an error of one sort or another. Does anyone know whetehr this can be done - and how?

Thanks.
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

better use this free component: http://vbaccelerator.com/codelib/zip/zipvb.htm
Avatar of sjpedro
sjpedro

Hi -
This code might give some ideas about how to use the wzcline.exe, since it uses the WinZip utility.  I use this code to zip files locally.  By the way, I believe emoreau's suggestion is the best solution.

 
Private Sub Form_Load()

    Dim ZipCommand  As String
    Dim ZipDir      As String
    Dim ZipSource   As String
    Dim ZipTarget   As String
    Dim ZipNow      As String

    'WinZip location
    ZipDir = "C:\Program Files\WinZip\winzip32.exe"
       
    'File you want to zip, if no file is given, it will zip folder
    ZipSource = "C:\temp\test.txt"
   
    'Destination and name of Zip file
    ZipTarget = "C:\temp\newzip"
   
    ZipCommand = ZipDir & " -a " & ZipTarget & " " & ZipSource
   
    ZipNow = Shell(ZipCommand, vbMinimizedFocus)
   
    Unload Me

End Sub
Briant:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
Moderator, my recommended disposition is:

    Save as PAQ -- No Refund.

DanRollins -- EE database cleanup volunteer
My recommandation: accept emoreau's comment
emoreau,
Just curious.  Why didn't you post a recommendation 3 weeks ago, when asked to do so?
-- Dan
A couple of months ago, clean up volunteers were posting real recommandations (not just dummy comments to wake up asker that most of the time have left EE). I do not think this "ping" method is THE answer to the pending questions (just like I don't beleive that THE answer is existing!).
This new method -- posting a wakeup ping via an automated process and following up with a human to read the posts -- is highly successful for several reasons:

  o  Many Askers finalize the questions themselves.
  o  Often, contributing Experts post a recommendation to help the CV.
  o  The remaining subset is much quicker to process -- it takes less than HALF the normal time.

VB had over 6500 open questions and there are as many as 30 new abandoned questions EVERY DAY -- the number was growing at an alarming rate!  This process has let us clear the backlog down to 4500 and we are actually on the way to catching up.

If you really think that you have answered a question, then please post a comment in response to the CleanupPing.  Otherwise, I and the other CVs will assume that neither the Asker nor any contributing Expert thinks there is a correct answer.   Management has asked us to stop putting half-correct and 'lazy' answers in the PAQ, so we are recommending DELETE more often now.

Also, I suggest that you *not* post "accept emoreau's comment" for every question because like the little boy who cried "wolf!" the CVs will eventually stop listening to your recommendations.

This Q is a case in point.  The Asker specifically requested help in writing a utility to interface to a command-line progream (wzcline.exe) and you pointed him to a site that provides a code library that interfaces with a DLL.  That *might* be useful, but unless the Asker says so, it can't possibly be considered the answer he wanted.

-- Dan
ASKER CERTIFIED SOLUTION
Avatar of YensidMod
YensidMod

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