In Windows Explorer you can extract a compressed folder (a zip file)
Is there an API or command line to extract a zip file using the same method programatically?
In Windows Explorer you can extract a compressed folder (a zip file)
Is there an API or command line to extract a zip file using the same method programatically?
You can use this VBScript script:
'Adapted from http://www.robvanderwoude.com/vbstech_files_zip.html
strFile = "c:\filename.zip"
strDest = "c:\files"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If Not objFSO.FolderExists(strDest) Then
objFSO.CreateFolder(strDest)
End If
UnZipFile strFile, strDest
Sub UnZipFile(strArchive, strDest)
Set objApp = CreateObject( "Shell.Application" )
Set objArchive = objApp.NameSpace(strArchive).Items()
Set objDest = objApp.NameSpace(strDest)
objDest.CopyHere objArchive
End Sub