Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call wzzip in vbscript: syntax?

Status
Not open for further replies.

GPM2001

Technical User
Oct 19, 2001
2
FR
Hi there,
I'd like to call the wzzip program (e.g : wzzip try.zip c:\*.bat)within a script, and I ca't get the proper syntax.
I need some help !
Thanks,
Pierre
 
PMFJI, but there is a command-line interface available for WinZip 8 as an add-on. See: thread329-85681

I'm not sure if that's what Pierre meant by wzzip - or if that's a totally different product. Jon Hawkins
 
Actually I found what I was looking for. I did it this way:

Dim myWinZip
Set myWinZip=CreateObject("WScript.Shell")
myWinZip.Run "wzzip c:\temp\test.zip c:\*.bat"

In fact, a Command Line for Winzip exists and can be downloaded on

It raises an other question:
is there a way to temporize actions in VBScript ?
I mean that if I run the following script...

myWinZip.Run "wzzip c:\temp\test.zip c:\*.bat"
myWinZip.Run "wzzip c:\temp\test.zip c:\*.exe"
myWinZip.Run "wzzip c:\temp\test.zip c:\*.doc"

...the test.zip file will not be updated quickly enough between the execution of 2 lines, and so the test.zip file will contain only the *.doc files, intead of *.bat and *.exe and *doc.

Any idea to cope with it ?
Thanks for your help guys!
Pierre
 
Do it all at once:

myWinZip.Run "wzzip c:\temp\test.zip c:\*.bat c:\*.exe c:\*.doc"
Jon Hawkins
 
Hello, GPM2001.

It is not futile, though, to answer your question. It is an illustration of what synchronous and asynchronous are meant for. With the run method, you can have bWaitOnReturn parameter to choose. To achieve what you look for, simply change the run lines to, say,

myWinZip.Run "wzzip c:\temp\test.zip c:\*.bat", 1, True

etc.

But, do it at once as posted above would suffice---read the manual.

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top