I have been working on a script to back up data to a zip file for recovery later. Although I have found most of the information I need online, I am having an issue finding a complete answer to my problem.
I have this bit of code:
strFolderToZip = "C:\Test\"
strZipFile = "C:\Test.zip"
Set objShell = CreateObject("Shell.Application")
Set objZip = objShell.NameSpace(strZipFile)
Set objFolder = objShell.NameSpace(strFolderToZip)
I like this bit of script. It is simple and adds files to an existing
Zip file. The issue I am having is around creating the zip file to add the files to.
How do I create the zip file (using vbscript or MS-DOS) required before executing this piece of code without using a 3rd party tool?
Obviously the MS-DOS command would be passed by the VBScript, like:
objShell.Run "cmd /c mkdir " & """" & strZipFile & """"
Any help would be greatly appreciated.