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.
|
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. |
|
|
|
- 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.
|
Example 1
|
|
Example 2
|
FileExtractPart("C:\MIS\Kalipso\Testfile.txt", PARENT_FOLDER)
Result = C:\MIS\Kalipso
|
|
FileExtractPart("C:\MIS\Kalipso\Testfile.txt", FILE_NAME)
Result = Testfile |
|
|
|
Example 3 |
|
Example 4
|
FileExtractPart("C:\MIS\Kalipso\Testfile.txt", FILE_EXTENSION)
Result = txt |
|
FileExtractPart("C:\MIS\Kalipso\Testfile.txt", FILE_FULL_NAME)
Result = Testfile.txt |
Updated: 4/11/2016 12:44 PM |