skip to content

File Name Templates

File name templates are used to customize file names generated by EZDetach. Templates allow you to do things like changing field order, customizing format for date and time, using various message values for subfolder naming, etc. Templates are configured in the Advanced Naming Options window.

A template is composed of Fields and any additional characters you might want to have included in the file names.


Fields are placeholders which are replaced with values from the attachment or message been saved. For example, %M_SUBJ% is replaced with the message subject. %A_F_N% is replaced with the attachment file name. The Add Field button is a simple way to add new fields to the template. Explore the drop-down menu under that button to learn about all possible Fields.

Field Truncation

You can specify a limit on the length of field value by adding a number in square brackets at the end of the Field. For example, %M_SUBJ[5]% would use the first 5 characters from the subject name.

Additional characters

In addition to Fields, you can also include other characters. They are usually used for field separators. However, they are not limited to separators. Use them for anything else you would like to appear in the file name. For example, if the attachment name is resume.doc and the message sender name is John Smith, here are a few sample templates and resulting file names.

Template Resulting File Name
%M_S_N% - %A_F_N% John Smith - resume.doc
%M_S_N% - %A_F_O[3]%.%A_F_E John Smith - res.doc
From %M_S_N% - %A_F_N% From John Smith - resume.doc

The extra characters you can use are not limited to separators. For example, you could use a template like From %M_S_N% - %A_F_N%. The resulting file name would be From John Smith - resume.doc.


When creating a template, you may only use characters which are valid in Windows file names. The following characters are not allowed: / : ? * | > < "  !.