Move FTP file
Description
Moves (renames) a file on an FTP/SFTP server to a new path on the same server. Takes an FTP file object from Find/Get FTP files — the server connection comes from the file itself. Branches on success/error; the error branch is taken when the file does not exist.
When to use
Use Move FTP file to rename a file or shuffle it between directories on a remote FTP, FTPS, or SFTP server. A common pattern is to move processed files out of an inbox into an archive directory so they are not picked up again on the next run. Wire in a file object from Find FTP files or Get FTP file; the connection is read off the file itself, so there’s no Credentials input to fill in. Both the file and its destination must live on the same server — there is no cross-server move. The Error pin fires if the file input isn’t connected, or if the upstream node reported exists = false.
Pins
Input pins
| Pin | Type | Default | Notes |
|---|---|---|---|
| File | FTP file | — | FTP file object from Find FTP files or Get FTP file. The error branch fires if this input isn't connected, or if the file's exists field is false — the server connection is read from the file object itself, so there's no separate Credentials input. |
| To path | string | — | Destination path, on the same server as the file input. The destination directory must already exist on most servers. |
Execution pins
| Pin | Direction |
|---|---|
| In | Input |
| Success | Output |
| Error | Output |
Example
After processing each file found by Find FTP files in /inbox, move it to
/archive. Wire FTP username/password credentials into Find FTP files, set
Path to /inbox, and on Success pass each Files element (via a For each
loop) into Move FTP file. Break the element to read its Path field, build
the destination with String concatenate (/archive/ + name), and wire that
into To path. Wire the Error pin to a Log message so failed moves surface
in the execution log.