Question:
Hello,
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
WScript.Quit
End If
' Returns the number of files and directories unzipped.
unzipCount = zip.Unzip(strPermPath)
If (unzipCount < 0) Then
MsgBox zip.LastErrorText
Else
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);