# path::get-file-name

Returns the filename for the specified path string.

### Usage

`string path::get-file-name(path)`

### Parameters

Name | Type | Description
--- | --- | ---
path | string | The path string from which to obtain the file name and extension.

### Return Value

A String consisting of the characters after the last directory character in path.

If the last character of path is a directory or volume separator character, an empty String is returned.

### Exceptions

The function will fail in any of the following circumstances:

- path contains one or more invalid characters.

### Requirements

Assembly: NAnt.Core (0.85.2478.0)