![]() ![]() ![]() ![]() 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. 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. Copy and paste the script into a file with the extension ".vbs". Microsoft Windows, WinZip, WinRAR, IZarc, Info-ZIP, 7-Zip, PeaZip, B1 Free Archiver, DotNetZip.I've combined this script from several different sources to suit my needs better. Each file is stored separately, allowing different files in the same archive to be compressed using different methods. ZIP files are archives that store multiple files.ZIP allows contained files to be compressed using many different methods, as well as simply storing a file without compressing it. However, unlike sector-based formats (such as ISO or VHD), WIM is file-based: The fundamental unit of information in a WIM is a file. Like other disk image formats, a WIM file contains a set of files and associated filesystem metadata. ZIP file format permits a number of compression algorithms, though DEFLATE is the most common. ZIP file may contain one or more files or directories that may have been compressed. ZIP is an archive file format that supports lossless data compression. It was developed by Microsoft to help deploy Windows Vista and subsequent versions of Windows operating system family, as well as Windows Fundamentals for Legacy PCs. The Windows Imaging Format (WIM) is a file-based disk image format. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |