delete (FTP command)
Overview
The delete command deletes a file from a given location on the remote server. No content is loaded into the flow.
Need to know
Regular expressions are supported when defining files to be removed with the delete command.
Connection settings
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.
Example
Scenario

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:

The steps

Connector settings
Our SFTP shape is configured as follows:

Look for files from the
root, which is defined as:/myfiles/folderBCheck the
pathfor the file(s) to remove, defined as:/^old.*/iDelete 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?