---
url: /process-functions/datasource-binarysave.md
description: Saves a base64 string to a file as bytes.
---

# datasource.binarySave&#x20;

Saves a base64 string to a file as bytes.

::: warning Deprecated
Use [`datasource.writeFile(fileName, datasource.base64Bytes(base64))`](/process-functions/datasource-writeFile) instead.
:::

```js
datasource.binarySave(fileName, base64, append)
```

## Parameters

| Parameter | Type | Description |
|---|---|---|
| `fileName` | `string` | The path of the file. |
| `base64` | `string` | The file's contents, base64-encoded. |
| `append` | `boolean` | Optional. `true` to add to the end of the file instead of replacing it. |

## Returns

`true` when the file was saved, otherwise `false`.

## Examples

```js
datasource.binarySave("path/to/my_file.bin", "SGVsbG8gd29ybGQh"); // "Hello world!"
```
