Overview
This node performs file and directory operations on an SFTP server, including moving (renaming) files or folders. It is useful for automating file management tasks on remote servers, such as reorganizing files, renaming directories, or moving files to new locations. For example, it can be used to move a file from one directory to another on an SFTP server as part of a workflow that processes and organizes files automatically.
Use Case Examples
- Move a file from '/old-folder/file.txt' to '/new-folder/file.txt' on an SFTP server.
- Rename a directory from '/old-directory' to '/new-directory' while optionally creating the new directory path if it doesn't exist.
Properties
| Name | Meaning |
|---|---|
| Old Path | The current path of the file or folder to be moved or renamed. This is a required string input specifying the source location on the SFTP server. |
| New Path | The new path where the file or folder will be moved or renamed to. This is a required string input specifying the target location on the SFTP server. |
| Options | Additional options for the move operation. Currently supports 'Create Directories' which, if true, will create the target directories if they do not exist. |
Output
JSON
success- Indicates whether the move operation was successful (boolean).
Dependencies
- An SFTP server connection requiring credentials such as host, port, username, password or private key authentication.
Troubleshooting
- Common issues include specifying paths that do not exist or lack of permissions to move files or create directories on the SFTP server.
- Error messages may indicate that the source path does not exist or that the node failed to connect to the SFTP server due to authentication issues. Verify credentials and paths.
- If 'Create Directories' option is enabled but the node fails, ensure the user has permissions to create directories on the server.