delete (FTP command)
Last updated
Was this helpful?
The delete command deletes a file from a given location on the remote server. No content is loaded into the flow.
Regular expressions are supported when defining files to be removed with the delete command.
When configuring an SFTP connector, three fields should be updated:
FTP command only: delete
The root to the directory where the required file is located. You could enter just / and then a full path in the path field, or you can provide the full path to the file.
If you are deleting multiple files using a regular expression, enter the entire path here, so the path field only contains your regular expression.
The filename or regular expression (if you specified the full path as root) or the full path to the file.

Our process flow is configured as follows:


In this flow, we need to delete all files that start with 'old' in /myfiles/folderB on the remote server:


Connector settings
Our SFTP shape is configured as follows:

Look for files from the root, which is defined as: /myfiles/folderB
Check the path for the file(s) to remove, defined as: /^old.*/i
Delete files with the ftp command. This is defined as: delete

On our remote server, all files starting with 'old' have been removed from /myfiles/folderB/:

Last updated
Was this helpful?
Was this helpful?