Overview
This node enables file and folder management on a Samba (SMB2) server. It supports operations such as deleting files or folders, downloading files, listing directory contents, renaming/moving files or folders, and uploading files. This is useful in scenarios where you need to automate interactions with SMB shares, for example:
- Automatically cleaning up files or folders on a network share.
- Downloading files from an SMB share for further processing.
- Uploading generated reports or backups to a shared folder.
- Renaming or moving files as part of a workflow.
- Listing directory contents to trigger actions based on file presence.
The "Delete" operation specifically allows removing files or optionally folders by specifying their full path on the SMB share.
Properties
| Name | Meaning |
|---|---|
| Path | The full file path of the file or folder to delete on the SMB share. |
| Options | Collection of additional options: |
| Folder | Boolean option indicating whether folders can be deleted (true) or only files (false). |
Output
The output consists of JSON objects representing the result of the delete operation for each input item. For the "Delete" operation, the node outputs the original input data unchanged if successful. If an error occurs and "Continue On Fail" is enabled, the output JSON will include an error field describing the failure.
No binary data is output by this operation.
Dependencies
- Requires access to an SMB2-compatible server.
- Needs credentials for authenticating with the SMB server (an API key or username/password).
- Uses temporary files internally for some operations (not relevant for delete but used in other operations).
- No additional external services are required beyond the SMB server.
Troubleshooting
Common issues:
- Incorrect or incomplete file path: Ensure the full path to the target file/folder is provided.
- Insufficient permissions: The user authenticated via credentials must have delete rights on the SMB share.
- Attempting to delete a folder without enabling the "Folder" option will cause failure.
- Network connectivity problems to the SMB server.
Error messages:
"Failed to delete file: <error message>": Indicates deletion failed due to permission issues, non-existent path, or network errors.- If "Continue On Fail" is disabled, the node execution stops on the first error.
- Enabling "Continue On Fail" allows the workflow to continue and returns error details in the output JSON.
Resolution tips:
- Verify the path exists and is accessible.
- Confirm credentials have sufficient privileges.
- Enable the "Folder" option if deleting directories.
- Check network connectivity and SMB server availability.
Links and References
If you want me to analyze other operations or resources, please provide their details!