login about faq

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.

asked Jul 23 '13 at 05:40

Orbit121's gravatar image

Orbit121
1112

edited Jul 23 '13 at 06:00


Check to see if you can use the UnzipMatching method.

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

link

answered Jul 23 '13 at 17:41

chilkat's gravatar image

chilkat ♦♦
11.8k316358420

edited Jul 23 '13 at 17:41

I don't quite understand how i would implement this into my code, would you be able to give me an example? Thanks.

(Jul 24 '13 at 06:45) Orbit121
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×87
×8
×4

Asked: Jul 23 '13 at 05:40

Seen: 1,095 times

Last updated: Jul 24 '13 at 06:45

powered by OSQA