Copy Code code as follows:
On Error Resume Next
Dim Objfso,sourcepath,targetpath
Function getzipfile (PATH)
Dim File,folder,sfolder,subfolder,files
If not objfso.folderexists (path) Then
Msgbox "Destination folder does not exist!" "
Else
Objfso.createfolder TargetPath & Right (Path,len (path)-len (SourcePath))
Set Folder=objfso.getfolder (PATH)
Set Files=folder.files
For each file in files
If StrComp (Objfso.getextensionname (file.name), "Zip", vbTextCompare) =0 Then
Objshell.namespace (TargetPath & Right (Path,len (path)-len (SourcePath))). Copyhere objshell.namespace (Path & "\" & File.name). Items (), 256
End If
Next
Set subfolder=folder.subfolders
For each sfolder in subfolder
Getzipfile path & "\" & Sfolder.name
Next
End If
End Function
Set objfso=server.createobject ("Scripting.FileSystemObject")
Set oapp=createobject ("Shell.Application")
Sourcepath= "C:\zipfiles"
Targetpath= "D:\tmp\" & Objfso.getfilename (SourcePath)
Getzipfile SourcePath
Set objfso=nothing
Set oapp=nothing