Returns the directory name from a path name. (version 4.69 or later)
dirname <strvar> <path>
Given a <path> pathname, this macro will delete any suffix beginning with the last slash('/') character and return the result into the <strvar> variable name.
The pathname will need not be existed.
dirname dir 'c:\teraterm\test.txt' ; dir = "c:\teraterm" dirname dir 'c:\teraterm\' ; dir = "c:" dirname dir 'c:\teraterm' ; dir = "c:"