> For the complete documentation index, see [llms.txt](https://doc.sysdevmobile.com/kalipso/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.sysdevmobile.com/kalipso/5.0/developing/form/expressions/functions/functions-descriptions/string-functions/fileextractpart.md).

# FileExtractPart

Kalipso - Form - Expressions - Functions - Functions Descriptions - String Functions - FileExtractPart

Extracts a part of the name of a file from a full file path.

### Parameters

* **File Path** <*string expression*> - The file path to extract the part from.
* **Part to Extract** <*string*> - The part of **File Path** to extract. It can be one of:
  * PARENT\_FOLDER – The parent folder of the specified file path.
  * FILE\_NAME – The name of the file without extension.
  * FILE\_EXTENSION – The file extension.
  * FILE\_FULL\_NAME – The file full name, including extension.

### Examples

* *Example 1*

FileExtractPart("C:\MIS\Kalipso\Testfile.txt", PARENT\_FOLDER)\
**Result** = C:\MIS\Kalipso

* *Example 2*

FileExtractPart("C:\MIS\Kalipso\Testfile.txt", FILE\_NAME)\
**Result** = Testfile

* *Example 3*

FileExtractPart("C:\MIS\Kalipso\Testfile.txt", FILE\_EXTENSION)\
**Result** = txt

* *Example 4*

FileExtractPart("C:\MIS\Kalipso\Testfile.txt", FILE\_FULL\_NAME)\
**Result** = Testfile.txt

{% hint style="info" %}
This can also be used to extract the parent or the name of a directory if the path specified is for a directory and not a file.
{% endhint %}
