File name masks
The file name mask defines how a file-based data port handles file names, depending on its Data direction. For inbound ports, it specifies which files the port retrieves from the inbox folder. For outbound ports, it specifies the name used for the exported file.
The mask is entered in File name mask on the Data ports form, next to Mask case sensitive. For more details, see Configure a Data port.
Inbound ports: files retrieved from the inbox folder #
The mask is compared with the name of every file in the inbox folder. Files in subfolders are not read.
*stands for any number of characters, including none.?stands for exactly one character.- Every other character stands for itself, including
., spaces, brackets,+, and$. - The mask must match the*whole file name.
- An empty mask takes every file in the folder.
Mask case sensitive decides whether INV*.csv also takes inv001.CSV. It is cleared by default, so it ignores letter case.
| Mask | Takes | Does not take |
|---|---|---|
*.csv | orders.csv, ORDERS.CSV | orders.csv.part, orders.csvx, orders.txt |
INV*.csv | INV001.csv, INV.csv | XINV001.csv, INV001.csv.bak |
INV_????.xml | INV_0042.xml | INV_42.xml, INV_00042.xml |
orders.csv | orders.csv | orders.csv_20261007, new orders.csv |
Invoice (1)*.pdf | Invoice (1) march.pdf | Invoice 1.pdf |
Because the whole name has to match, a file that is still being uploaded under a temporary name—orders.csv.filepart or orders.csv.part, as many transfer clients do—is not taken by *.csv until the upload is complete and the file has its final name. An empty mask or * takes such files as well, so give an inbound port a mask whenever the sender uploads under temporary names.
Several ports can read the same folder, as long as no file name matches the masks of two of them. INV*.csv and ORD*.csv can share a folder; ORD*.csv and ORDERS*.csv cannot, because ORDERS1.csv matches both.
Regular expressions are not supported: \d or [0-9] in a mask stand for those characters themselves.
Earlier versions compared only the beginning of the name.
*.csvalso tookorders.csv.part, and a mask without*, such asINV, took every file whose name starts withINV. Use a mask likeINV*to keep that behavior.
Outbound ports: the name of the exported file #
Without a mask, the exported file keeps the name the data processor gave it—for a data entity export, a unique name generated by Data management. With a mask, the file is named by the mask: text is written as-is, and placeholders in braces are replaced when the file is written.
Placeholders #
- {date}—the export date,
yyyyMMdd. - {time}—the export time,
HHmmss. - {datetime}—both,
yyyyMMdd_HHmmss. - {unixtime}—seconds since 1 January 1970 UTC. Names made with it sort in the order the files were written.
- {guid}—a new GUID with dashes; {guid:N} writes it without dashes.
- {uid}—a short random code of 8 characters, digits and the letters a–f; {uid:12} sets another length, up to 32.
- {name}—the name the data processor gave the file, without its extension.
- {ext}—the extension of that file, with the dot, for example
.csv. - {0}—the older spelling: the export time in UTC as
yyyy-MM-dd_HH-mm-ss. Masks written with it keep working.
{date}, {time}, and {datetime} use the time zone of the legal entity the port runs in. Any .NET date and time format can follow a colon: {date:dd.MM.yyyy} writes 07.10.2026, {time:HH-mm} writes 13-15, and {datetime:yyyyMMddHHmmssfff} adds milliseconds. The formats are described in Custom date and time format strings. {0} takes a format the same way, in UTC.
To write a brace in the name, double it: {{ and }}.
Examples #
For a file exported on 7 October 2026 at 13:15:30, which the data processor named a1b2c3.csv:
| Mask | File name |
|---|---|
Orders_{datetime}{ext} | Orders_20261007_131530.csv |
Orders_{date}_{uid}.csv | Orders_20261007_5e21f4ab.csv |
Orders_{date:dd.MM.yyyy}.csv | Orders_07.10.2026.csv |
{name}_{time}{ext} | a1b2c3_131530.csv |
Export_{guid:N}.xml | Export_3f2a9c1e7b4d4e0a9c5f12ab34cd56ef.xml |
{{v2}}_{date}.csv | {v2}_20261007.csv |
Customers.csv | Customers.csv |
The mask writes exactly what it says. An extension appears only where the mask has one, typed as .csv or written as {ext}; Orders_{datetime} writes a file without an extension.
A mask that gives the same name on every run, such as
Customers.csv, replaces the previous file if the receiving system has not collected it yet. Include{datetime}when every export must be kept, and{uid}or{guid}when two exports can run within the same second.
When the mask is not valid #
The mask is checked when you enter it on an outbound port, and again at every export. A problem raises a warning but never stops the export:
- A character that is not allowed in file names—
\ / : * ? " < > |—is replaced with_. For example,INV*.csvwritesINV_.csv. - An unknown placeholder such as
{dat}, a format that does not fit, such as{date:Q}or{uid:40}, or a brace without a pair leaves the file with the name the data processor gave it.
At export time, the warning appears in the infolog of the run: on screen for a run started by hand, and in the batch job log for a scheduled one.
Note: Mask case sensitivity has no effect on outbound ports.