---
url: >-
  /statelake/scripting-reference/classes/file-connection-class-tflofilecon/filecon.filename.md
---

# FileCon.FileName

Returns the destination file name pattern used to name the file during writing.

When the *Dest* **Data Definition** is a **File Definition**, you can use this property to modify the name of the output file after mapping.

The filename property is a pattern - therefore you can set it directly to the name you desire, or you can include **Tags** within the name.

**Tags** will be resolved when the file is being saved.

**Declaration**: property FileName: string

An example of its use, follows.

```pascal
procedure OnMapEvent(var Value:Variant);
begin
 //Result is the name of the file that is the source of the map
  Value := Dest.FileCon.Filename;
end;
```
