Skip to main content

FILEPATH

Returns the file directory as a string.

info

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

Syntax

string FILEPATH(string fileName)

Example

FILEPATH("C:\mydir\myfile.ext")

Will return 'C:\mydir'.


If you have a series of documents contained within folders for example the structure might be : Documents\Folder1\Document1.docx you could pass the Path column into the function:

FILEPATH(Path)

This would return Documents as the result as that is the first directory the document is stored in.