Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 390
  • Last Modified:

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.
0
Briant
Asked:
Briant
1 Solution
 
Éric MoreauSenior .Net ConsultantCommented:
better use this free component: http://vbaccelerator.com/codelib/zip/zipvb.htm
0
 
sjpedroCommented:
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
0
 
CleanupPingCommented:
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?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
DanRollinsCommented:
Moderator, my recommended disposition is:

    Save as PAQ -- No Refund.

DanRollins -- EE database cleanup volunteer
0
 
Éric MoreauSenior .Net ConsultantCommented:
My recommandation: accept emoreau's comment
0
 
DanRollinsCommented:
emoreau,
Just curious.  Why didn't you post a recommendation 3 weeks ago, when asked to do so?
-- Dan
0
 
Éric MoreauSenior .Net ConsultantCommented:
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!).
0
 
DanRollinsCommented:
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
0
 
YensidModCommented:
No feedback from user to determine if comments work.  Question is PAQ'd and no points refunded.

YensidMod
Community Support Moderator @Experts Exchange
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now