> For the complete documentation index, see [llms.txt](https://chaoses-ib.gitbook.io/directory-opus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://chaoses-ib.gitbook.io/directory-opus/manual/reference/evaluator/filepart.md).

# FilePart

\<evalcmd> FilePart && string && Filename component of specified path. && path && path && File or folder path. && \[components] && int && Number of components to return. \</evalcmd>

Returns the filename (trailing) component or components of the specified path. If *components* isn't specified, the final component is returned.

//<Example://>

```
Output(FilePart("C:\one\two\file.jpg"));
--> file.jpg
```

*See also:*\
[fileext](/directory-opus/manual/reference/evaluator/fileext.md)\
[parent](/directory-opus/manual/reference/evaluator/parent.md)\
[root](/directory-opus/manual/reference/evaluator/root.md)\
[stem](/directory-opus/manual/reference/evaluator/stem.md)
