# FileExtractPart

> Kalipso Studio 6.1 documentation · https://doc.sysdevmobile.com/kalipso/6.1/documentation/expressions/functions/string-functions/fileextractpart
>
> FileExtractPart returns the parent folder, file name, extension or full file name from a full file path.

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

:::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.
:::
