[SalesForce] SSJS to delete files on enhanced FTP

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?

Best Answer

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