# FileName - Script function

The FileName function returns a string containing the name of the table file currently being read, without path but including the extension.

Syntax:

FileName()

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/Scripting/FileFunctions/FileName.htm)

#### Examples and results:

Scripting examples

| Example | Result |
| --- | --- |
| `LOAD  *, FileName(<br>) as X from`<br>`C:\UserFiles\abc.txt` | Will return<br>'abc.txt' in field X in each record read. |