tumblr tracker

CreateZipArchive

Library Reference ›› Zip ››
Parent Previous Next

Zip.CreateZipArchive


Namespace: Zip


Creates a Zip Archive handle that can be used to add files and/or folders to it. You'll use AddFileToZipArchive and AddFolderToZipArchive to populate the archive with files and folders. When you're done, you should call FinalizeZipArchive to complete the creation and release the resources.


retval = Zip.CreateZipArchive(ZipFilePath)


Parameters:

- ZipFilePath; path to the zip archive to create; it should be a valid file path,


Returns:

Zip Archive handle; handle value.


Example


$ZipArchive = Zip.CreateZipArchive("C:\TEMP\NewZip.zip");

Zip.AddFolderToZipArchive($ZipArchive, "C:\TEMP\Test1");
Zip.AddFileToZipArchive($ZipArchive, "C:\TEMP\Test.exe");

Zip.FinalizeZipArchive($ZipArchive);