SFTP icon

SFTP

SFTP sunucusu ile dosya işlemleri yap

Overview

This node performs file operations on an SFTP server, specifically supporting the deletion of files or folders. It connects to an SFTP server using provided credentials and allows users to delete a specified file or folder at a given remote path. It supports options to delete folders recursively, which means all subdirectories and their contents can be deleted if desired. This node is useful for automating file management tasks on remote servers, such as cleaning up files or directories.

Use Case Examples

  1. Deleting a single file at a specified path on an SFTP server.
  2. Deleting a folder and all its subdirectories recursively on an SFTP server.

Properties

Name Meaning
Path The remote path of the file or folder to delete on the SFTP server.
Options Additional options for deletion, including whether the target is a folder and whether to delete recursively if it is a folder.

Output

JSON

  • success - Indicates whether the delete operation was successful (true).
  • error - Error message if the delete operation failed.

Dependencies

  • ssh2-sftp-client library for SFTP operations

Troubleshooting

  • Ensure the remote path exists; otherwise, the node will throw an error indicating the path does not exist.
  • If deleting a folder, ensure the 'Folder' option is set to true; otherwise, the node attempts to delete a file and may fail.
  • If recursive deletion is enabled, ensure you have the necessary permissions to delete all subdirectories.
  • Common error messages include 'Path does not exist' or permission denied errors, which can be resolved by verifying the path and user permissions on the SFTP server.

Discussion