# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.sysdevmobile.com/kalipso5/developing/form/expressions/functions/functions-descriptions/string-functions/fileextractpart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
