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

# FileCon.FileDir

Returns the destination file directory pattern used to set the folder where the file is saved during writing.

When the *dest* **Data Definition** is a **File Definition**, you can use this property to modify the folder the output file is saved to after mapping.

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

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

**FileDir** includes a trailing backslash.

**Declaration**: property FileDir: string

An example of its use follows.

```pascal
procedure OnMapEvent(var Value:Variant);
begin
 //Result is the destination directory that the file will be saved to
  Value := Dest.FileCon.FileDir;
end;
```
