Within SFMC we have set up an listening trigger automation in automation studio which runs whenever a new file is put on the ftp site.

However often it fails on the import as the filename which contains Hours and Minutes might be slightly off.

For example the file is uploaded at 1/1/2016 at 10:53 pm but has the name myfile_010120161050.txt. As a result when the trigger runs it calls the import but the times do not match so it says 'Error - file does not exist'.

How can we get this to work without using a static file name?

Is there a wildcard we can use like so instead of:


We can just use:


Thanks Bryan

1 Answer 1


Yes you can do "Contains" "Begins with" or "Ends with" for the naming convention.

ref (https://help.exacttarget.com/en/documentation/automation_studio/triggered_automations/)

When setting up a filename pattern, users select an operator to dictate how Automation Studio should parse the filename. The available operators are Contains, Begins With, and Ends With.

Use Contains when Automation Studio should find files whose filename includes the filename pattern at any point (prior to the file extension, which is not parsed).


Filename pattern = AUG14

Files named AUG14import.csv, Update_ AUG14.txt, and NewContactsAUG14profileupdates.zip will kick off this automation. Files named AUG 14data.csv, CustomerFiles.AUG14, and DailyJob-Aug-14.txt will not trigger this automation.

Use Begins With when Automation Studio should find files whose filename starts with the filename pattern.


Filename pattern = AUG14

Files named AUG14import.csv, aug14files.zip, and Aug14098786.txt will trigger this automation. Files named 1AUG14data.csv, 120814_ AUG14.zip, and _ AUG14.txt will not trigger this automation.

Use Ends with when Automation Studio should find files whose filename ends with the filename pattern.


Filename pattern = AUG14

Files named ImportAUG14.csv, aug14_listpull_aug14.zip, and usersAug14.txt will trigger this automation. Files named datapullAUG14_01.csv, listinfoAUG14.run.txt, and Aug14_.zip will not trigger this automation.

For the import activity, there are other personalization strings that can be used. https://help.exacttarget.com/en/documentation/automation_studio/triggered_automations/

Try using %%FILENAME_FROM_TRIGGER%% inside the import activity.

Substitution Strings

Place the following substitution strings in the "File Naming Pattern" field to call a file transfer activity or import activity. In other words, use these strings to import, upload, or download a file from a transfer location.


This returns the name of the file placed in the FTP folder.

Prefixes, suffixes, and/or file extensions are not allowed.  File extensions are not read by the automation engine, so any characters that follow the final dot [.] in a filename are automatically excised

  • No sorry I am not talking about the filename in the triggered automation, I am talking about the actual import information. (i.e Interactions menu > Import). Where you actually specify the import method, file location, where the data is to be loaded.
    – BDOB83
    Mar 5, 2016 at 16:48
  • Updated with help on import activity naming issue Mar 5, 2016 at 23:51
  • I believe this is no longer true regarding the import step - FILENAME_FROM_TRIGGER has disappeared from the documentation and my import isn't working anymore.
    – St.G
    Dec 21, 2016 at 22:02
  • I have not noticed any issues in my existing automation, but the page is strangely absent now. Very weird, especially as there was no notification or alternative presented. I would talk to your rep about it and find out what is going on. Please be sure to share any resolution or information you get. Dec 22, 2016 at 2:48
  • 1
    @chorlesbarkley - FILENAME_FROM_TRIGGER does not remove file extension. It will return exact file name. I actually recommend now to utilize BASEFILENAME_FROM_TRIGGER because if you drop a large file, the trigger file name might include a 'part' aspect or slightly different file extension as the large files are imported in parts - which could mess up the import utilizing the personalization string. Using BASE instead and adding the file extension manually helps remove this risk. Jul 21, 2020 at 15:06

You must log in to answer this question.

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