WinZip automation: using wzunzip -v to extract archive content inf

G

Guest

Hi all.

I'm trying to automate WinZip from within MS Access.
I'm using a registered version of WinZip 10.0 Pro.

I ran into some trouble when i tried to extract the contents of the Zip
archive to a text file.

Here's the syntax i've been trying to use:

C:\Program Files\Winzip\Wzunzip -v
"C:\Test_Data\99_WinZip_automation_tests\test.zip"
">C:\Test_Data\99_WinZip_automation_tests\test.txt"

Test.zip is the name of the Zip archive.

It resides in folder:
C:\Test_Data\99_WinZip_automation_tests

Test.txt is the name of the text file where i would like to export the file
names that are included in the WinZip archive.

Anybody ever used this functionality of WinZip?

Thank you,
Alex
 
G

Guest

You need to use the Shell Function to call an external program. Here is an
example from about 7 years ago:

On Error Resume Next
intZipVal = Shell(strZipPath & "wzzip -yp " & strFoxProPath & strZipFile
& " " & strFoxProPath & "wd*.dbf", vbNormalFocus)
If intZipVal = 0 Or Err.Number = 53 Then
MsgBox "Could not Create ZIP File for State Transmission" & vbCrLf & _
"ZIP File May be Created Manually for Transmission",
vbExclamation, "Error"
End If

http://www.winzip.com/downcl.htm
 
G

Guest

Klatuu thanks, we've been into this before.

I found some good resource to execute the Shell function and wait till
Winzip completes its task.

This post is more about this specific functionality of Winzip, i.e.
extracting the contents (and by that i mean only the file names) of the
Winzip archive into a .txt file.

According to the syntax, it's supposed to work with the wzunzip -v command,
but i couldn't get it to work.

You may consider that the Shell and wait part has been taken care of.

Alex
 
G

Guest

Right, I remember now. I thought I remembered posting to this issue before.
I had forgotten you needed the Shell and Wait. In the code I posted, we
didn't need it because we were zipping, not unzipping. As to your specific
need, I don't think I can help. That is more a function of Winzip than it is
of Access, and it has been 1999 since I used it. Have you tried contacting
Winzip to see if they can help?
 
G

Guest

Yes, i got in touch with Winzip, expecting a reply.

Thanks for your time anyhow.

Alex
 
G

Guest

In case anyone is interested, the correct syntax is:
C:\Program Files\Winzip\Wzunzip -o
"-@C:\Test_Data\99_WinZip_automation_tests\test_contents.txt"
"C:\Test_Data\99_WinZip_automation_tests\test.zip"

This will extract the names of the files contained in the Winzip archive:
"C:\Test_Data\99_WinZip_automation_tests\test.zip"

to the text file:
C:\Test_Data\99_WinZip_automation_tests\test_contents.txt

Winzip has a very good technical support dept. (replies within a business
day), and the automation works neatly.

Alex
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top