How to unzip a file in VBScript using internal Windows XP options in How to unzip a file in VBScript using internal Windows XP options in windows windows

How to unzip a file in VBScript using internal Windows XP options in


Just set ZipFile = The location of the zip file, and ExtractTo = to the location the zip file should be extracted to.

'The location of the zip file.ZipFile="C:\Test.Zip"'The folder the contents should be extracted to.ExtractTo="C:\Test\"'If the extraction location does not exist create it.Set fso = CreateObject("Scripting.FileSystemObject")If NOT fso.FolderExists(ExtractTo) Then   fso.CreateFolder(ExtractTo)End If'Extract the contants of the zip file.set objShell = CreateObject("Shell.Application")set FilesInZip=objShell.NameSpace(ZipFile).itemsobjShell.NameSpace(ExtractTo).CopyHere(FilesInZip)Set fso = NothingSet objShell = Nothing