The Rename document Action allows you to automatically rename incoming files. This Action changes the names of processed documents. By default, it's set to {*SrcFileName} – the source file's name. The Rename document Action is typically used to:
- Mark processed files by date/time
- Sort and group files for further combining and merging
- Simplify file names or create a custom naming pattern
Note: this Action must be used in combination with other ones. Don't forget to add a finalizing Action — such as Convert to Image or Convert to PDF — for the process to take effect.

Using macros to create a new file name
Besides plain text, you can utilize built-in macros to create your own naming pattern. These macros allow you to check various file properties — such as EXIF data, filename metadata, and date/time information — and apply them to the output filename.
You can use various macros (by using the Macro button) to check file properties such as file's name and extension, EXIF metadata, date/time, and other information to apply them to the output filename.
For example, if your source files are email message files (.msg, .eml files), you can set a naming pattern using data retrieved from them: Delivery timestamp, To address, From address, Subject, and more.

Description of all available macros
Macro/Group of macros | Macro | Description |
---|---|---|
Regular expression of source file name | {*srcfilename("^(\d+)")}, {*srcfilename("(\d+)$")} and others | Various parts of the source file's name:
Note: Regular expressions starting with "Take" will add information to the output filename, while those starting with "Cut" will remove information. For example, Cut one character removes the first symbol from the filename. |
Filename | ||
Source file name | {*srcfilename} | File name (without extension). Example: Document_A |
Source file extension | {*srcfileext} | File extension. Example: docx |
Source file subfolder, level 1 | {*srcfilesubfolder(1)} | The name of the first subfolder nested in the Hot Folder. Example: C:\Work\Hot_Folder\level1\level2\level3 |
Source file subfolder, level 2 | {*srcfilesubfolder(2)} | The name of the second subfolder nested in the Hot Folder. Example: C:\Work\Hot_Folder\level1\level2\level3 |
Source file subfolder, level 3 | {*srcfilesubfolder(3)} | The name of the third subfolder nested in the Hot Folder. Example: C:\Work\Hot_Folder\level1\level2\level3 |
Toggle case (switch between upper and lower) | {SrcFileName("upper")}, {SrcFileName("lower")} | Apply case conversion to change text to uppercase or lowercase using values "upper" or "lower". This can be applied to various macroses, for example: {SrcFileName("upper")} {SrcFileName("(.*?\'|(.*?)$","upper")} |
Date/Time | {date(m-d-yyyy)}, {time(h-mm-ss tt)}, {date(yyyy)}, {date(mm)}, {date(dd)}, and more | Several macros that insert date and time (in various formats). They include Full date, Year, Month, Day, Full time, Hour, Minute, Second, Millisecond |
Email metadata | {*MsgDeliveryTime(M-d-yyyy h-mm-ss tt)}, {*MsgSubject}, and more | Information that can be retrieved from email message files (MSG, EML): Delivery timestamp, To address, From address, Subject, and more. |
EXIF | {*Exif_ImageDescription}, {*Exif_Make}, {*Exif_Model}, and more | Information retrievable from a source file's EXIF metadata (typically from photos or image files): Description, Make, Model, Software, Date/Time, GPS Latitude, GPS Longitude |
Miscellaneous | ||
Unique sequential file number (in a session) | {*DocUID} | This macro adds a unique sequential number to each document within a session (from "Start" to "Stop" of FolderMill's Processor). |
Adding a delimiter between regular expressions
If you're using macros from the Regular expression of original file name group, you can add a delimiter between strings when using a regular expression (). For example, you can use symbols like "-", ";" or "~" as delimiters between parts of the resultant filename.
To specify a delimiter, open the Advanced settings of this Action and enter the desired delimiter in the field Regexp delimiter string.
Example
Using Cut all apostrophes macro removes apostrophes from filenames, separating the parts of the filename. You can add a delimiter like "-" between these parts. For instance, Test'name.docx becomes Test-name.docx
Preview your output filename
Want to preview how your filename will look after applying macros? We've got you covered. In the New file name text field, right-click and select Show test panel. This lets you experiment until you achieve the perfect filename.

You may also like to read:
New help with configuration? Don't hesitate to contact us.