Code: Select all
' Author: Troy Hockman
' Desc: Simple script to extract windows zip file
' Change variables to your likeing
ZipFile="C:\temp\Sysinternals.zip"
ExtractTo="C:\temp"
'If the extraction location does not exist create it.
Set objFSO = CreateObject("Scripting.FileSystemObject")
If NOT objFSO.FolderExists(ExtractTo) Then
objFSO.CreateFolder(ExtractTo)
End If
'Extract the contants of the zip file.
set objShell = CreateObject("Shell.Application")
set FilesInZip=objShell.NameSpace(ZipFile).items
objShell.NameSpace(ExtractTo).CopyHere(FilesInZip)
Set fso = Nothing
Set objShell = Nothing