Move file on server
Moves or renames one file on an SFTP or FTPS server.
@lainstack/file-server/move-file · Object storage
How to use it
Section titled “How to use it”Use Move file on server to rename a file or move it to another folder on the same SFTP or FTPS server, for example to an archive folder after reading it. The file is moved on the server and nothing is downloaded.
Good to know:
- From path and To path are relative to the connection’s root folder. The target folder must already exist.
- If it exists is Fail by default: the step fails when the target is taken. Replace overwrites the target.
- Replace on a server that cannot rename over an existing file deletes the target first and then renames. For a short moment no file exists at the target path.
- A missing source file fails the step.
- If the connection drops during the move, the step fails with an unknown outcome. The file may be at either path, so check the server before running it again.
- Moving a file to its own path does nothing and succeeds.
Settings
Section titled “Settings”| Setting | Key | Type | Details |
|---|---|---|---|
| SFTP or FTPS connection (required) | credentialId |
Connection | Uses the selected SFTP or FTPS connection. At most 255 characters. |
| From path (required) | from |
Text | Path relative to the connection’s root folder. |
| To path (required) | to |
Text | Path relative to the connection’s root folder. |
| If it exists | ifExists |
One of Fail the step, Replace it |
Default fail. |
Outputs
Section titled “Outputs”| Output | Path | Type |
|---|---|---|
| From path | from |
Text |
| To path | to |
Text |