Archived Forum Post

Index of archived forum posts


"openzip" to open any file in the current folder?

Jul 24 '13 at 06:45


I am looking for a way to get the openzip function to extract all files within a particular folder ending with the extension ".piz".

This is my current code but of course doesn't work:

   strTempPath = objFSO.GetSpecialFolder(intTemporaryFolder) & "\Temp Fedex Email Downloads\"  
   strPermPath = objFSO.GetSpecialFolder(intTemporaryFolder) & "\Fedex Email Downloads\"

     zip.DecryptPassword = "*censored*"

     success = zip.OpenZip(strTempPath & "*.piz")
     If (success <> 1) Then
         MsgBox zip.LastErrorText
     End If

     '  Returns the number of files and directories unzipped.
     unzipCount = zip.Unzip(strPermPath)
     If (unzipCount < 0) Then
         MsgBox zip.LastErrorText
         MsgBox "Success! :D"
     End If

Any help will be much appreciated,

thanks, kind regards.


Check to see if you can use the UnzipMatching method.

For example: zip.UnzipMatching("c:/unzipdir","*/specificFolder/*.piz",false);