Category: File function (found in the "Special" category in the EasyMorph application)
This function combines two paths into one, intelligently dealing with backslashes and relative paths.
This function is convenient in projects executed on EasyMorph Server. In these cases, the root folder can be defined as a task parameter and the actual path calculated using combinepath.
Argument | Type | Description |
---|---|---|
path1 | Text | A folder path. Absolute or relative. |
path2 | Text | A relative file or folder path. |
Return value type: Text.
If both arguments contain relative paths, then the resulting path will be converted into an absolute path in the current directory.
combinepath( 'C:\data', 'file.txt' ) //Returns 'C:\data\file.txt'
combinepath( 'C:\data', '..\file.txt' ) //Returns 'C:\file.txt'
combinepath( 'C:\myfiles', 'mydocs\myprojects' ) //Returns 'C:\myfiles\mydocs\myprojects'