basename
Returns trailing name component of path.
basename <strvar> <path>
Remarks
Given a <path> string containing the path to a file or directory, this macro will return the trailing name component into the <strvar> variable name.
The file or directory will need not be existed.
Both '/' and '\' are accepted as folder separators.
Example
basename fname '/Users/user/teraterm/test.txt' ; fname = "test.txt"