zip

Archives the file(s), files, and is defined in the omlziptoolbox.

Syntax

l = zip(archive, files)

l = zip(archive, files, dir)

Inputs

archive
Name of the zip archive to be created. If the file already exists, it will be overwritten.
Type: string
files
List of the file(s) to be archived.
Type: cell | string
dir (optional)
Specifies the directory where the files are located.
Type: string

Outputs

l
List of the files in the zip archive, archive.
Type: cell

Examples

Archive files in the current directory:
l = zip('test.zip', 'input*.*')

l =
{
[1,1] input1.oml
[2,1] input2.oml
}
Archive all files in a specified directory:
l = zip('test.zip', '*.*', 'c:\dir1')

l =
{
[1,1] input1.oml
[2,1] input2.oml
[3,1] testfiles\abs1.oml
[4,1] testfiles\abs2.oml
[5,1] testfiles\abs3.oml
[6,1] testfiles\abs4.oml
[7,1] testfiles\abs5.oml
[8,1] testfiles\abs6.oml
[9,1] testfiles\abs7.oml
}