tumblr tracker

AddFileToZipArchive

Library Reference ›› Zip ››
Parent Previous Next

Zip.AddFileToZipArchive


Namespace: Zip


Adds a new file to a previously opened Zip Archive.


retval = Zip.AddFileToZipArchive(ZipArchive, FilePathToAdd)


Parameters:

- ZipArchive; Zip Archive handle, previously opened by a call to CreateZipArchive

- FilePathToAdd; path to the file to add to the Zip archive; must be a valid path to an existing file.


Returns:

True or false; boolean 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);