Question : Vb Script Needed

Have a script which works wonderful to find a zip file and then extract that zip file in a folder however the zip files we get from a vendor have folders in them.
What I need to do now can be in 2 different directions:
1. If there is a way to extract all the files from the folders in the zip to one folder.
or
2. A script that will go into as many folders created and search out for .wav files and move them to a distinct folder.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
set zip = CreateObject("Chilkat.Zip2")
Dim objFSO
Dim ofolder
Dim objStream
Dim strSearch
Dim strfolderSearch
Set objFSO = CreateObject("scripting.filesystemobject")
Set objStream = objFSO.createtextfile("c:\search.txt", True)
strfolderSearch = "D:"
strSearch = ".zip"
CheckFolder (objFSO.getfolder(strfolderSearch)), objStream
'MsgBox "File Search Completed." + vbCr + "Please check c:\search.txt for details."
 
Sub CheckFolder(objCurrentFolder, objtxtFile)
Dim strTemp
Dim strOutput
Dim objNewFolder
Dim objFile
Dim objStream
For Each objFile In objCurrentFolder.Files
strTemp = Right(objFile.Name, 4)
If UCase(strTemp) = UCase(strSearch) Then
strOutput = CStr(objFile.Name)
objtxtFile.writeline strfoldersearch + strOutput
ziplocation = strfoldersearch + "\" + strOutput
objtxtFile.writeline ziplocation
End If
Next
For Each objNewFolder In objCurrentFolder.subFolders
CheckFolder objNewFolder, objtxtFile
Next

'  Any string unlocks the component for the 1st 30-days.
success = zip.UnlockComponent("Anything for 30-day trial")
If (success <> 1) Then
    MsgBox zip.LastErrorText
    WScript.Quit
End If

success = zip.OpenZip(ziplocation)
If (success <> 1) Then
    MsgBox zip.LastErrorText
    WScript.Quit
End If

'  Set the password needed to unzip.
'  This password must match the password used when the zip
'  was created.
zip.SetPassword "Ech0p@ss"

'  Returns the number of files and directories unzipped.
unzipCount = zip.Unzip("c:\extractedfiles")
If (unzipCount < 0) Then
    MsgBox zip.LastErrorText
Else
    wscript.sleep (9000) 
End If
End sub

Answer : Vb Script Needed

I believe the the first one returns the size of the array (number of elements) and the second one returns the size of one element in the array.
Random Solutions  
 
programming4us programming4us