Directory Name
Get the directory name from a full directory path.
Returns the directory part of a full directory path, calculating the directory part of the string according to the optional systemtype parameter . If the systemtype is not specified then the system type is taken from the Endpoint currently on the stack. If no Endpoint is on the stack, an exception is thrown.
dirname is also a method that can be called on a Endpoint object. In this case, the system type is taken from the Endpoint itself.
Usage
dirname(path [,systemtype])
or
_Server_.dirname(path)
Returns:
String: The directory part of the passed path.
Example
set res = dirname("C:\temp\myfolder\myfile.txt, 'windows'");
//
// res is C:\temp\myfolder
//
set res = dirname('$2$DKA200:[FERDU01.TEST]vmsfile.txt', 'vms');
//
// res is $2$KDA200:[FERDU01.TEST]
//
See Also
basename()
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified August 31, 2024: Signed-off-by: tracyragan <[email protected]> (20379ca)