DeleteFile
Delete files in the remote SFTP Server.
Deleting Files
SFTP allows only a small subset of columns to be used in the EXEC query. These columns can typically be used with only = comparison.
For example:
EXECUTE DeleteFile RemoteFile = '/home/test/CDataTest/SPTest/TestFile.txt'
To delete all files inside a path:
EXECUTE DeleteFile RemotePath = '/home/test/'
To delete all files in parent and subfolders:
EXECUTE DeleteFile RemotePath = '/home/test', IncludeSubFolders = 'true'
To delete files using a pattern:
EXECUTE DeleteFile RemotePath = '/home/test', RemoteFile = '*.txt'
Input
Name | Type | Required | Description |
RemoteFile | String | False | Specify the remote file name/path you want to delete. |
RemotePath | String | False | Specify the remote folder path. When IncludeSubFolders is set to true, all the files in the subfolder will be deleted. |
IncludeSubFolders | Boolean | False | Whether or not the subfolders inside the path should be deleted.
デフォルト値はfalseです。 |
Result Set Columns
Name | Type | Description |
Success | String | Whether or not the operation was successful. |
FileName | String | Deleted file. |