
File system Delete
CertifiedDelete a file over SMB
File system Delete
Delete a file over SMB
Removes the specified file on an SMB/CIFS share. Default port 445.
type: io.kestra.plugin.fs.smb.DeleteExamples
Delete a single file
id: fs_smb_delete
namespace: company.team
tasks:
- id: delete
type: io.kestra.plugin.fs.smb.Delete
host: localhost
port: "445"
username: foo
password: "{{ secret('SMB_PASSWORD') }}"
uri: "/my_share/dir1/file.txt"
Delete files matching a pattern
id: fs_smb_delete_regexp
namespace: company.team
tasks:
- id: delete
type: io.kestra.plugin.fs.smb.Delete
host: localhost
port: "445"
username: foo
password: "{{ secret('SMB_PASSWORD') }}"
uri: "/my_share/dir1/"
regExp: '.*\.csv'
Properties
host *Requiredstring
Remote host
uri *Requiredstring
URI of the file to delete
errorOnMissing booleanstring
falseRaise error if missing
password string
Password
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
port string
445Remote port
recursive booleanstring
falseInclude subdirectories
If true, traverses subdirectories when deleting files matching regExp.
regExp string
A regular expression to filter files for deletion
When set, uri must point to a directory. The pattern is matched against the share-relative path of each file (for example, /share_name/dir/file.csv). Only regular files are deleted; directories are skipped.
username string
Username
Outputs
deleted boolean
falseWhether the file or directory was deleted
uri string
uriThe deleted URI
uris array
URIs of all deleted files when regExp is used