Skip to main content

FILETEXT

Returns file data as a string.

Syntax

string FILETEXT(string fileName)

Example

FILETEXT("myfile.ext")

or

FILETEXT("C:\\mydir\\myfile.ext")
info

Remember to escape the backslashes in your file path, otherwise your expression will error.


If we took the example of being connected to a file directory and we wanted to extract the file data as a string we can use the following expression:

FILETEXT(CONCAT(SETTINGA("Path"),"\\",FullFileName))

This uses a combination of functions such as SETTINGA - to get the full directory we are connected to and CONCAT to combine the directory, a backslash, and the FullFileName column, and the FILETEXT to get the data from the file.