DelUnzip.cmd:
RD /S /Q "%USERPROFILE%\My Documents\Unzipped"
cscript UnzipZip.vbs
UnzipZip.vbs:
strZipFile = "\file.zip"
strUnzipped = "\Unzipped\"
Sub UnZip(ExtractTo,ZipFile)
Set fso = CreateObject("Scripting.FileSystemObject")
If NOT fso.FolderExists(ExtractTo) Then
fso.CreateFolder(ExtractTo)
End If
Set objShell = CreateObject("Shell.Application")
Set FilesInZip=objShell.NameSpace(ZipFile).items
ObjShell.NameSpace(ExtractTo).CopyHere(FilesInZip)
Set fso = Nothing
Set objShell = Nothing
End Sub
set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("MyDocuments")
strZipPath = strDesktop & strZipFile
strUnzipPath = strDesktop & strUnzipped
UnZip strUnzipPath , strZipPath