Skip to content

Extract file name ​

ts
function ExtractName(fullyQualifiedFileName: string): string;

Returns the file name (including extension) from a fully qualified path.

Parameters ​

NameTypeDescription
fullyQualifiedFileNamestringFull path including directories and file.

Returns ​

A string containing the file name, including its extension.

NOTE

If the file has no extension, the full file name is returned. Hidden files (starting with a dot) are supported.

Example ​

ts
var res = ExtractName('/docs/sheets/budget.xlsx');
// res will be "budget.xlsx"