VBScript extract help with 1.8

May 5, 2009 at 1:15 PM
Edited May 5, 2009 at 1:19 PM
Hi, I have tried to create an extracting script without success.

The script below fails on line 4 with this messgae Microsoft VBScript runtime error: Object doesn't support this property or method: 'zip1.Read'
I would appreciate any help with this or other examples for vbscript.

sSourceFile="C:\Temp\Logs\in\procmon.zip"
sDestFolder="C:\Temp\Logs\Out\"
set zip1 = CreateObject("Ionic.Zip.ZipFile")
ZipFile = zip1.Read(sSourceFile)
Call zip1.ExtractAll(sDestFolder)

Coordinator
May 5, 2009 at 6:23 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
May 8, 2009 at 5:10 AM

get version v1.8.2.15 to get the fix for this. 

The code will look something like this:

 

    Dim zip2 
    WScript.echo("Instantiating another ZipFile object...")
    Set zip2 = CreateObject("Ionic.Zip.ZipFile")
    
    WScript.echo("Initialize (Read)...")
    zip2.Initialize(filename)

    WScript.echo("setting the password...")
    zip2.Password = "This is the Password."

    WScript.echo("extracting...")
    zip2.ExtractAll("DotNetZip-extract")

    WScript.echo("Disposing...")
    zip2.Dispose()

    WScript.echo("Done.")