![create zip folder windows 10 create zip folder windows 10](https://support.shift4.com/hc/article_attachments/360057032014/mceclip5.png)
I will post something related to WSkids answer as sadly i cannot use the comment function. ' delay until at least items at the top level are availableĭo Until objApp.NameSpace( target ).Items.Count + intSkipped = intSrcItems IntSrcItems = objApp.NameSpace( source ).Items.Count ObjApp.NameSpace( target ).CopyHere objItem ' if this folder is empty, then skip it as it can't compress empty folders Set objFolder = objFSO.GetFolder( objItem.Path ) ' Loop over items within folder and use CopyHere to put them into the zip folderįor Each objItem in objApp.NameSpace( source ).Items Set objApp = CreateObject( "Shell.Application" ) ' this is the header to designate a file as a zip Set zip = objFSO.OpenTextFile(target, 2, vbtrue) Set objFSO = CreateObject("Scripting.FileSystemObject") Here is the vbs code - Set Args = Wscript.Arguments It won't copy empty folders so be careful.
#CREATE ZIP FOLDER WINDOWS 10 ZIP FILE#
Path to script, source folder, zip file to make (include. Usage: in the run box or command line put- "C:\zipper.vbs" "C:\folderToZip\" "C:\mynewzip.zip" The script was originally made for Windows XP, but it also works in Windows 7 圆4 Ultimate - no guarantee's if Windows will keep around the various Shell objects this uses.
![create zip folder windows 10 create zip folder windows 10](https://www.isumsoft.com/images/windows-10/how-to-password-protect-zip-file-in-windows-10/enter-password-for-zip-archive.png)
Copy and paste the script into a file with the extension ".vbs". I've combined this script from several different sources to suit my needs better.