Skip to main content

1E SDK

COMBINEPATHS

Function

COMBINEPATHS

Action

Takes two paths as strings, or a path and a basename as strings. It combines them and returns the result.

Parameters

(string) Path.

(string) Path, filename, or path and filename.

Return values

(string) Concatenation of input parameters with a directory separator between them.

Examples

// Returns "c:\tmp\things\file.txt" on Windows OS
SELECT COMBINEPATHS("C:\\tmp","things\\file.txt") AS Path;
// Returns "/var/log\things/file.txt" on Windows OS
// Returns "/var/log/things/file.txt" on non-Windows OS
SELECT COMBINEPATHS("/var/log","things/file.txt") AS Path;

Notes

The function is not file system aware; it does not check to see if the path of file exists, and does not change the input strings.

The function is OS aware; it assumes the directory separator is \ on Windows and / on other OS.