Use substitution strings in a File Transfer activity or Data Copy or Import (formerly Import File) activity in Automation Studio.
Place these substitution strings in the File Naming Pattern field of a File Transfer activity or Data Copy or Import activity. Use these strings to reuse the trigger file in a subsequent step of a file drop automation.
%%FILENAME_FROM_TRIGGER%%
This string returns the name of the file placed in the FTP folder. Prefixes, suffixes, and file extensions are not allowed. The automation engine doesn’t read file extensions, so any characters that follow the final dot [.] in a file name are excised.
| Substitution String | File Dropped | Result |
|---|---|---|
| %%FILENAME_FROM_TRIGGER%% | Myfilename.txt.gpg.zip | Myfilename.txt.gpg.zip |
| %%FILENAME_FROM_TRIGGER%%.zip | Myfilename.txt.gpg.zip | Invalid – no suffix allowed |
%%FILENAME_FROM_TRIGGER_BASE%%
This string returns the name of the file without the final file extension. Prefixes, suffixes, and extension substitutions are allowed.
| Substitution String | File Dropped | Result |
|---|---|---|
| %%FILENAME_FROM_TRIGGER_BASE%% | Myfile.txt.zip.gpg | Myfile.txt.zip |
| %%FILENAME_FROM_TRIGGER_BASE%%.gpg | Myfile.txt | Myfile.gpg |
%%BASEFILENAME_FROM_TRIGGER%%
This string returns the name of the file without any file extensions. Prefixes, suffixes, and extension substitutions are allowed.
| Substitution String | File Dropped | Result |
|---|---|---|
| %%BASEFILENAME_FROM_TRIGGER%% | Myfile.txt | Myfile |
| %%BASEFILENAME_FROM_TRIGGER%% | Myfile.txt.zip.gpg | Myfile |
| %%BASEFILENAME_FROM_TRIGGER%%.dat | Myfile.txt | Myfile.dat |
| %%BASEFILENAME_FROM_TRIGGER%%_%%Month%%_%%Day%%.txt | Myfile.txt | Myfile_02_18.txt |
| %%Month%%_%%Day%%_%%BASEFILENAME_FROM_TRIGGER%%.txt | Myfile.txt | 02_18_Myfile.txt |
| %%BASEFILENAME_FROM_TRIGGER%%.txt | Myfile.02.08.txt | Myfile.txt |