Overview
This node connects to an SFTP server to perform various file operations such as creating directories, listing files, downloading, uploading, renaming, and deleting files or folders. It is useful for automating file management tasks on remote servers, for example, creating a new directory to organize files, uploading files to a server, or downloading files for processing.
Use Case Examples
- Create a directory at a specified path on the SFTP server to organize files.
- Upload a file from local storage to a remote directory on the SFTP server.
- Download a file from the SFTP server for local processing.
- List files in a remote directory, optionally including all subdirectories, to get an overview of stored files.
Properties
| Name | Meaning |
|---|---|
| Path | The path of the directory to create on the SFTP server. This is a required string input that specifies where the new directory will be created. |
Output
JSON
success- Indicates whether the directory creation was successful (true/false).createdPath- The path of the directory that was created on the SFTP server.
Dependencies
- Requires an SFTP server connection with credentials including host, port, username, and authentication (password or private key).
Troubleshooting
- Common issues include connection failures due to incorrect credentials or network issues. Verify the SFTP credentials and network accessibility.
- Errors may occur if the specified path already exists or if the user lacks permissions to create directories at the specified location.
- If the path is invalid or the server is unreachable, the node will throw an error indicating the failure reason.
Links
- SFTP Protocol Overview - General information about the SFTP protocol used for secure file transfer.
- ssh2-sftp-client NPM Package - The underlying Node.js library used by the node to interact with the SFTP server.