1 Reply Latest reply on May 12, 2015 9:11 AM by malachydevlin

    zip multiples files into 1 zip file

    malachydevlin

      I am trying to find a method / plugin that will allow me to select various files and compress into 1 zip file.

      Anyone know of any plugins?

      Or any VBS code that may do it?

       

      thanks.

        • 1. Re: zip multiples files into 1 zip file
          malachydevlin

          Ive answered my own question.

          for reference the following VBS will zip a folder with multiple files to a zip file.

          (you need to create a temp folder and temp files first and then remove later)

           

          folder1 = "C:\tempfolder"
          zipfile = "tempfolder\tempname.zip"

          Set objFSO = CreateObject("Scripting.FileSystemObject")
          objFSO.OpenTextFile(zipfile, 2, True).Write "PK" & Chr(5) & Chr(6) _
            & String(18, Chr(0))

          Set ShellApp = CreateObject("Shell.Application")
          Set zip = ShellApp.NameSpace(zipfile)
          zip.CopyHere folder1

          WScript.Sleep 10000