travelnitwit
Technical User
I need a VB script to unzip multiple different zip folders. I have this script - but it does not work.
Unzip "c:\DailySearch\*.zip", "c:\DailySearch"
Sub Unzip(sSource, sTargetDir)
Set oFSO = CreateObject("Scripting.FileSystemObject")
if not oFSO.FolderExists(sTargetDir) then oFSO.CreateFolder(sTargetDir)
Set oShell = CreateObject("Shell.Application")
Set oSource = oShell.NameSpace(sSource).Items()
Set oTarget = oShell.NameSpace(sTargetDir)
oTarget.CopyHere oSource, 256
End Sub
Unzip "c:\DailySearch\*.zip", "c:\DailySearch"
Sub Unzip(sSource, sTargetDir)
Set oFSO = CreateObject("Scripting.FileSystemObject")
if not oFSO.FolderExists(sTargetDir) then oFSO.CreateFolder(sTargetDir)
Set oShell = CreateObject("Shell.Application")
Set oSource = oShell.NameSpace(sSource).Items()
Set oTarget = oShell.NameSpace(sTargetDir)
oTarget.CopyHere oSource, 256
End Sub