Samba (SMB2) icon

Samba (SMB2)

Transfer files via Samba (SMB2)

Delete

AI-generated

Overview

This node operation deletes a file or folder on a Samba (SMB2) server. It is useful for automating file management tasks such as cleaning up files or removing obsolete folders on a remote SMB share. For example, it can be used to delete log files after processing or to remove temporary folders created during workflows.

Use Case Examples

  1. Deleting a specific file by providing its full path, e.g., /public/documents/file-to-delete.txt.
  2. Deleting a folder by enabling the 'Folder' option and specifying the folder path.

Properties

Name Meaning
Path The full file path of the file or folder to delete. This is required to specify the exact target for deletion.
Options.folder Boolean option to specify whether folders can be deleted. If true, the node will delete folders; otherwise, it deletes files only.

Output

JSON

  • json
    • error - Error message if the deletion failed and continueOnFail is enabled.

Dependencies

  • Requires an SMB2 API credential to connect to the Samba server.

Troubleshooting

  • Common errors include permission issues or incorrect file/folder paths, resulting in failure to delete the target.
  • Error messages like 'Failed to delete file' indicate issues with SMB connection settings or file permissions. Verify the path and credentials.
  • If the node is set to continue on fail, errors are returned in the output JSON under the 'error' property for each item.

Links

Discussion