---
url: /process-functions/datasource-zip.md
description: Zips one or more files into a single zip file.
---

# datasource.zip

Zips one or more files into a single zip file.

```js
datasource.zip(fileNames, outputFileName)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `fileNames` | `string \| string[]` | The path of the file to zip, or an array of paths. |
| `outputFileName` | `string` | The path of the zip file to create. |

## Returns

`true` when the zip file was created. `false` when the list is empty, a path is invalid or a file can't be found.

## Examples

```js
datasource.zip("myfile.txt", "output.zip");
datasource.zip(["file1.txt", "file2.txt"], "output.zip");
```
