Macros for renaming and alerting
- Last Updated: July 20, 2026
- 2 minute read
- Automate MFT
- Documentation
Automate MFT supports the use of macros to dynamically insert values into file names and email alerts during task execution. Macros act as placeholders that are replaced with real-time data when a task runs, allowing for flexible and context-aware automation.
Use cases
- File renaming: Customize file names during transfer by embedding dynamic elements such as timestamps or original file names.
- Email alerts: Include task-specific or file-specific details in alert messages for better traceability and context.
my_file.txt, you can configure the rename step
as:Archive-[yyyy]-[MM]-[dd]-[OrigName]When
the task completes, Automate MFT will rename the file to something like
this:Archive-2025-07-04-my_file.txt
Macros syntax
- Macros must be enclosed in square brackets, for example,
[OrigName]. - Macros are case-sensitive.
- Date/Time macros reflect the current system time on the Agent OS or UTC if using a cloud agent.
- Macros do not reference file metadata such as last modified date.
Where to use macros
- File-by-file processing: File-specific macros (such as
[OrigName],[FileSize],[EmailSubject], and[EmailBody]) and date/time macros (such as[dd]and[yy]) are supported. - Post-run email steps: Task-specific macros (such as
[TaskID]and[TaskFolder]) and date/time macros (such as[dd]and[yy]) are supported.
Supported macros
| Macro | Description | Example |
|---|---|---|
|
|
Destination file name including extension. If the rename
operation is enabled, the |
|
|
|
Destination folder path without the file name. |
If the file is located at
/backup/monthly/report.pdf, the
value is |
|
|
Size of the file in bytes. | 1048576 |
|
|
Unique identifier of the file, in GUID format. | 2b1e4f60-8c2a-4e5a-9b7d-3a2f6c8e9d12 |
|
|
File extension. | pdf |
|
|
File name without extension. | report |
|
|
Full source path including file name. | /backups/monthly/report.pdf |
|
|
Original file name with extension. | report.pdf |
|
|
Path relative to base folder. | monthly/report.pdf |
|
|
Description of the task. | Monthly backup of
financial reports |
|
|
Unique ID of the task execution. | 123456789 |
|
|
Name of the organizational folder where the task is located |
If the task is in All Tasks/First Level/Second Level/Third Level/, the value is Third Level |
|
|
Full folder path of the task. |
If the task is in All Tasks/First Level/Second Level/Third Level/, the value is All Tasks/First Level/Second Level/Third Level |
|
|
Unique ID of the task. | 987654321 |
|
|
Name of the task. | Monthly Backup |
|
|
Comma-separated list of tags assigned to the task. |
If the task has tags PCI and HIPAA, the
value is |
|
|
Actual start time (using local timezone for
the private agent or UTC for the cloud agent) in the format
YYYY-MM-DD
HH:MM:SS. |
2025-01-23
09:00:00 |
|
|
Description of task error (only available as a post-task item). | Internal server
error |
|
|
Scheduled start time (using local timezone
for the private agent or UTC for the cloud agent) in the format
YYYY-MM-DD
HH:MM:SS. |
2025-01-23
09:00:00 |
|
|
Status of the task run. | Success,
Failure |
|
|
This will use the value contained in the user defined parameter. |
Whatever is currently contained in the user specified parameter. |
| Macro | Description | Example |
|---|---|---|
[ActualStart] |
Actual start time (using local timezone for
the private agent or UTC for the cloud agent) in the format
YYYY-MM-DD
HH:MM:SS. |
2025-01-23
09:00:00 |
[ErrorDescriptionTask] |
Description of task error (only available as a post-task item). | Internal server
error |
[NominalStart] |
Scheduled start time (using local timezone
for the private agent or UTC for the cloud agent) in the format
YYYY-MM-DD
HH:MM:SS. |
2025-01-23
09:00:00 |
[TaskDescription] |
Description of the task. | Monthly backup of
financial reports |
[TaskExecID] |
Unique ID of the task execution. | 123456789 |
[TaskFolder] |
Name of the organizational folder where the task is located |
If the task is in All Tasks/First Level/Second Level/Third Level/, the value is Third Level |
[TaskFolderFullPath] |
Full folder path of the task. |
If the task is in All Tasks/First Level/Second Level/Third Level/, the value is All Tasks/First Level/Second Level/Third Level |
[TaskID] |
Unique ID of the task. | 987654321 |
[TaskName] |
Name of the task. | Monthly Backup |
[TaskStatus] |
Status of the task run. | Success, Failure |
[TaskTags] |
Comma-separated list of tags assigned to the task. |
If the task has tags PCI and HIPAA, the value is |
|
|
This will use the value contained in the user defined parameter. |
Whatever is currently contained in the user specified parameter. |
| Macro | Description | Example |
|---|---|---|
|
|
Day of week; three-letter abbreviation. |
|
|
|
Day of week; full. |
|
|
|
Day of month; minimal representation. |
|
|
|
Day of month; two-digit representation. |
|
|
|
Hour; two-digit representation, 24-hour format. |
|
|
|
Hour; two-digit representation, 12-hour format. |
|
|
|
am/pm; two-digit representation. |
|
|
|
Month; minimal numeric representation. |
|
|
|
Month; two-digit numeric representation. |
07 |
|
|
Month; short representation |
|
|
|
Month; full representation. |
|
|
|
Seconds; two-digit representation. |
|
|
|
Minutes; two-digit representation. |
|
|
|
Year; two-digit representation. |
|
|
|
Year; four-digit representation. |
|
When processing files downloaded from an IMAP endpoint, additional metadata from the source email message is available through macros.
| Macro | Description | Example |
|
|
Subject of the email message that contained the attachment. |
Monthly Sales Report |
|
|
The plain-text body of the email. |
|
|
|
The HTML body of the email. |
|
|
|
A convenience macro that evaluates to
|
Please find the attached sales report for June. |