Zip
Compress files or a folder into a .zip archive, or add them to an existing one, optionally protected with a password (AES-256, opened by 7-Zip, WinZip and most tools).
Command in the File toolkit · id ooa.file/zip · 9 inputs (2 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Source | File | Yes | File or folder to compress, or name rules choosing the files. | |
| Target | File | Yes | Archive path, e.g. out/report.zip. | |
| Pattern | String | No | Only add files whose names match this glob pattern; all files when empty. | |
| Compression | String | No | normal | normal: default size and speed; fast and fastest trade size for speed; store adds files uncompressed. |
| Overwrite | Boolean | No | true | Replace an existing archive; when false an existing archive stops the step. |
| Delete originals | Boolean | No | false | Delete the files that were added once the archive is complete. |
| Password | Credential | No | Encrypt every file with this password (AES-256). Windows Explorer cannot open such archives; 7-Zip, WinZip and most tools can. | |
| Add to existing | Boolean | No | false | When the archive already exists, keep what is in it and add the files (overwrite is then ignored); a file whose name is already in it replaces that entry. Not with a password. |
| Only newer | Boolean | No | false | When adding to an existing archive, replace an entry only when the file is newer than it (by more than 2 seconds, the precision of zip dates); new names are always added. |
Outputs
| Output | Type | What it is |
|---|---|---|
| path | File | Created archive. |
| added | Number | Number of files written into the archive (new or replaced). |