Move File
Move File
Section titled “Move File”Type: move-file · Package: Filesystem Activities v1.0.0 · Output: string
Moves a file from a source path to a destination path. The original ceases to exist in its previous location. As a special case, if source and destination are in the same folder with a different name, it is equivalent to rename. Widely used to archive already processed documents or reorganize downloaded files.
How it works
Section titled “How it works”Move the file from source to destination. By default does not overwrite: if the destination already exists, it fails (unless overwrite = true).
Required parameters
Section titled “Required parameters”| Parameter | Editor | Description |
|---|---|---|
source | expression | Source file path. |
destination | expression | Destination path (or new name, in the same folder). |
Optional parameters
Section titled “Optional parameters”| Parameter | Editor | Description |
|---|---|---|
overwrite | boolean | Replace if the destination already exists. By default false. |
Output
Section titled “Output”Returns the destination path of the moved file, in case you want to capture it into an output variable.
Examples
Section titled “Examples”Archivar tras procesar:
Move File source = = ruta destination = = pathJoin("C:/procesados", fileName(ruta))Renombrar:
Move File source = "C:/datos/temp.csv" destination = "C:/datos/clientes_final.csv"Related activities
Section titled “Related activities”- Copy File — copy while preserving the original.
- Create Directory — prepare the destination folder.
- List Files — get the files to move.