---
url: /flow/guide/scripting-reference/classes/file-connection/filecon.filename.md
---

# FileCon.FileName

## Declaration

`property FileName: string`

### Example

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

## Description

Returns the 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](/flow/guide/tag-reference/) within the name. Tags will be resolved when the file is being saved.
