Returns the name of a file or a directory indicated by a path.
1 file.getName
<file.getName>
<file /> !
</file.getName>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Efile | file |
Returns | |
---|---|
Type | Description |
String | Name of the file. |
Example
Print on screen the name of a file.
Copy
<xsql-script name='file_getName_sample1'> <body> <set name='m_path'> <string>c:<file.separator />jas<file.separator />webstudio.gc</string> </set> <println trim='true'> Name of the file<string.space /><m_path/><string.space />:<string.space /> <file.getName> <file name='#m_path' type='absolute' /> </file.getName> </println> </body> </xsql-script>