Below is my script
zIP Script
wvar1 = WScript.CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) & "\Dumps"
wvar2 = WScript.CreateObject("Scripting.FileSystemObject").GetSpecialFolder(2) & "\Dumps.zip"
set wshell = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
ArchiveFolder wvar2, wvar1
Sub ArchiveFolder (zipFile, sFolder)
With CreateObject("Scripting.FileSystemObject")
zipFile = .GetAbsolutePathName(zipFile)
sFolder = .GetAbsolutePathName(sFolder)
With .CreateTextFile(zipFile, True)
.Write Chr(80) & Chr(75) & Chr(5) & Chr(6) & String(18, chr(0))
End With
End With
With CreateObject("Shell.Application")
.NameSpace(zipFile).CopyHere .NameSpace(sFolder).Items
Do Until .NameSpace(zipFile).Items.Count = _
.NameSpace(sFolder).Items.Count
WScript.Sleep 1000
Loop
End With
End Sub
unzIP Script
Set objFile = objFSO.GetFile(strPath)
strFolder = objFSO.GetParentFolderName(objFile)
ZipFile = "" & strFolder & "\Scripts\Dumper_AV.zip" & ""
ExtractTo= var1
Set fso = CreateObject("Scripting.FileSystemObject")
sourceFile = fso.GetAbsolutePathName(ZipFile)
destFolder = fso.GetAbsolutePathName(ExtractTo)
Set objShell = CreateObject("Shell.Application")
Set FilesInZip=objShell.NameSpace(sourceFile).Items()
objShell.NameSpace(destFolder).copyHere FilesInZip, 16
Set fso = Nothing
Set objShell = Nothing
Set FilesInZip = Nothing
But i wanted it hidden to zip silently, but it opens up a progress box displaying compressing same with my unzip script. is there a way to hide it.
As per docs vOptions 4 to hide progress is being ignored
Solved Hidden Unzipping But solution required for hidden Zipping
Compress-Archive: Compress_Archive_by_Extension.vbs - Hackoo