Append one path to another with directory sperators.

appendstd appends one path to another formatting the resulting path 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.

appendstd is also a method that can be called on an Endpoint object. In this case, the system type is taken from the Endpoint itself.

appendstd differs from append since it ensures that the directory separator chars are appropriate to the system type regardless of how they are formatted in the passed paths.


appendstd(path1, path2 [, systemtype])




String: The result of appending path2 to path1, formatted according to the specified systemtype or the system type of the Endpoint object.


set res = appendstd(@'C:\Temp', 'folder/file.txt', 'windows');


// res is C:\Temp\folder\file.txt

// separator char has been modified for windows _Endpoint_s.


set res = appendstd('$2$DKA200:[FERDU01]', 'TEST/file.txt', 'vms');


// res is $2$DKA200:[FERDU01.TEST]file.txt


See Also:


Last modified June 15, 2020: Remove extra headers in DMScript (102cb1a)