ExtractFileName |
%ExtractFileName(Str)%
Extracts the name and extension portions of a filename. The resulting string is the right-most characters of the filename, starting with the first character after the colon or backslash that separates the path information from the name of the file and its extension. The resulting string is equal to FileName if FileName contains no drive and folder parts.
For instance, if the complete path and filename specified was:
c:\automation\my_groovy_tasks\my_number_one_task.aml
This extended function would return:
my_number_one_task.aml
Parameter |
Description |
A text string containing the full path from which the filename should be extracted. |
Sub Main
'will return filename.txt
MsgBox ExtractFileName("c:\foldername\filename.txt")
End Sub