---
title: "spread · RUAL Documentation"
description: "Copies a single source file to multiple destination paths, creating a real copy for each. Each entry in paths is a full destination path including the f…"
canonical: https://docs.rual.nl/block-types/files/file_spread
language: en
---

# spread

This block is part of the [`files`](https://docs.rual.nl/block-types/files) group and was last modified in core [`v15.0.0`](https://docs.rual.nl/core-versions/150000).

Copies a single source file to multiple destination paths, creating a real copy for each. Each entry in `paths` is a full destination path including the filename (e.g. `/public/uploads/hero.png`), so one upload can be fanned out to several locations and/or names at once.

- flow `flow`

- file required `file` The single source file to copy. When an array is given, the first file is used.

- paths required `array` Array of full destination paths, each including the filename, e.g. `["/public/uploads/hero.png", "/public/thumbs/hero.png"]`.

- overwrite required `v15.0.0` `condition` Overwrites file at destination if it exists.

Default `true`

- flow `flow`

- success `condition`

- error `value`

- files `file` Array of the created file copies (one per destination path).

| `file spread` |
| --- |
| `file copy multi` |
| `file fan out` |

A typical wiring for [spread](https://docs.rual.nl/block-types/files/file_spread): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; [get file from assets](https://docs.rual.nl/block-types/files/file_from_assets) feeds the `file` pin; [with values](https://docs.rual.nl/block-types/array/array_of_values) feeds the `paths` pin; [==](https://docs.rual.nl/block-types/condition/condition_equal) feeds the `overwrite` pin; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%20ui/state_debug).

![Studio canvas example for the spread block: typical wiring for spread.](https://docs.rual.nl/canvas-examples/file_spread.png)

### Version history

Introduced in [`v15.0.0`](https://docs.rual.nl/core-versions/150000).
