wwApi::ZipFolder (deprecated)

This function has been deprecated: Please use the wwZipArchive class instead

Zips an entire folder into a zip archive with optional wild card selection.

ZipFolder(lcZipFile, lcFolder, llFast, lcFileSpec)

Return Value

.T. or .F.

Parameters

lcZipFile
Name of the Zip file to create.

lcFolder
The folder that is compressed into zip file. Can contain recursive folders.

llFast
If true uses fast instead of optimal compression.

lcFileSpec
Allows you to specify one or more filespecs to filter files. Multiple file lists should be separated by , or ;. Examples:

  • *.md
  • *.md,*.py,*.jpg,*.pdf

Note: the filespec cannot reference filenames or partial filespecs that include commas or semicolons as these characters are used as separators.

Remarks

  • This is a standalone function not part of the wwAPI class.
  • Depends on wwDotnetBridge

Example

DO wwDotnetBridge
DO wwapi

lcZipFile = "D:\temp\zipfiles.zip"

ZipFolder(lcZipFile,"D:\temp\DecoPlateServices",.F., "*.cs,*.md")

* GoUrl(lcZipFile)  && open zip file

? UnzipFolder(lcZipFile,"d:\temp\Unpacked\1")

See also:

Class wwApi

© West Wind Technologies, 1996-2024 • Updated: 06/01/24
Comment or report problem with topic