FILENAME
The FILENAME function returns the file name or path portion of the input path.
Input/Output
Number of Connections: 1
| Input | Data Type | Description |
| Input1 | String | The file path. |
| Output | Data Type | Description |
| Output1 | String | The file name or path. |
| Output2 | String | The file name string when specifying both the file name and path. |
Property
| Name | Property Type | Description |
| Get | choice |
Defines which portion of the input path to return.
| Name | - |
Outputs the file name.
|
| Directory | - |
Outputs the directory path.
|
| Both | - |
Outputs both the file name and directory path.
In this case, there are two outputs. The directory name is output from Output1. The file name is output from Output2
|
|
Topic
- The path separator is system dependant.
In Win32, the path separator may be "\" or "/". In Unix, the path separator will be "/".
-
Null will be returned if the
Get property is set to Directory but there is no directory path in the input string.
- When returning the directory path, the path separator is not modified.
Example
| Property | Output |
| Input1 | c:\Data\index.xml | Get | Name | index.xml |
| Property | Output |
| Input1 | c:\Data\index.xml | Get | Directory | c:\Data\ |
| Property | |
| Input1 | c:\Data\index.xml | Get | Both | Output1 | c:\Data\ |
| | Output2 | index.xml |