tumblr tracker

CompressSingleFile

Library Reference ›› Zip ››
Parent Previous Next

Zip.CompressSingleFile


Namespace: Zip


Creates a new zipped version of a file. If you need to compress only one file, this is the easiest way. If more than one file need to be added to the Zip archive, see the CreateZipArchive function.


retval = Zip.CompressSingleFile(FilePathToCompress, ZipFilePath)


Parameters:

- FilePathToCompress; path to the file to compress; must be a valid path to an existing file.

- ZipFilePath; path to the newly created zip archive; must be a valid path.


Returns:

True or false; boolean value.


Example


Zip.CompressSingleFile("C:\TEMP\Test.exe", "C:\TEMP\Test.exe.zip");