I have a Tracking Extract which pushes the Zip file to Enhanced FTP. I want to delete these files after they have imported into a Data Extension

How can I do that? am thinking of writing an SSJS activity that can delete the files. Is that possible?

2 Answers 2


You can open a support request to enable the 'Delete file from ET FTP or Safehouse' Extract Type in the Data Extract Activity, which will delete the file that matches the filename that you defined in the 'File Naming Pattern' field.

Here's a screenshot of this Extract Type (and other available options).

Data Extract Activity Options

  • Zip, Convert XML, Mobile Push Detail Extract Report are also options. Commented Sep 23, 2018 at 19:13
  • 1
    Yes, I'm not sure why these available types are (a) not all documented and (b) only provisioned on request. I'm just working on an implementation and no extract types were available. It's a pretty useless activity without them! Commented Sep 23, 2018 at 22:46

As far as I know, it's not possible to delete files from the FTP with platform scripting.

Files in the Export and Import directories are purged after 21-30 days, if that matters.

  • 3
    You can also request specific retention periods for files on the Enhanced FTP via Support case.
    – Macca
    Commented Jul 14, 2017 at 3:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .