---
title: "File name formats"
slug: "bc-file-name-formats"
tags: ["BC", "BIS", "Business Central", "Business Integration Solutions", "Task"]
updated: 2026-06-25T09:59:05Z
published: 2026-06-25T09:59:05Z
canonical: "docs.staedean.com/bc-file-name-formats"
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.staedean.com/llms.txt
> Use this file to discover all available pages before exploring further.
# File name formats
When setting up a [File Writer](/business-central/docs/bc-set-up-the-file-writer-endpoint) or an [Azure File Writer](/business-central/docs/bc-azure-file-writer-endpoint), specify the name of the file to create. The assist edit on the **File name** field opens a list of predefined macros you can use in naming the file. These macros replace at run time with actual values.
## Macros
This table shows the macros you can use on file writer endpoints":
| Token | Description |
| --- | --- |
| $(MessageNumber) | A unique message number linked to the message. |
| $(Month) | Current month. |
| $(DayOfMonth) | Day ordinal of the current month. |
| $(Year) | Current year. |
| $(Hours) | Current hour. |
| $(Minutes) | Current minute. |
| [$(TableField())](/business-central/docs/bc-file-name-formats#tablefieldfieldname) | Table field value from the incoming record. |
| $(FullOriginalFileName) | Original file name including the extension. |
| $(OriginalFilename) | Original file name excluding the extension. |
| $(OriginalFilenameExtension) | Original file name extension, without the dot; for example, `xml` not `.xml`. |
## TableField()
The **File name formats** page lets you include field values from the incoming record. Replace with the actual field name in the table, without affixes (no brackets, signs, quotes, or other delimiters).
**Scenario:**
Record: Table **Sales Header** with fields **Document Type**, **No.**, **Sell-To Customer Name**.
Connection: Timer Event > XML Generator > **Splitter** > **Azure File Writer** with file name set to `Order_$(TableField()).xml`
Setting the file name to `Order_$(TableField(No.)).xml` includes the sales order number in the file name; for example, `Order_SO01234.xml`.

## Solution Center setup
If a macro cannot translate at run time, the default value applies. This format can conflict with Azure Storage file name restrictions.
To prevent message failures due to curly brackets, enable the **Macros with parentheses** flag in [Solution Center Setup](/business-central/docs/bc-solution-center). When enabled, macros use parentheses `()` instead of curly brackets `{}`. This is a global setting.

## Related
- [Set up the File Writer endpoint](/bc-set-up-the-file-writer-endpoint.md)
- [Azure File Writer endpoint](/bc-azure-file-writer-endpoint.md)
- [Solution Center](/bc-solution-center.md)