syntax:functions:combinepath
This is an old revision of the document!
Table of Contents
CombinePath(path1, path2)
Category: File function (found in the "Special" category in the EasyMorph application)
Description
This function combines two paths into one, intelligently dealing with backslashes and relative paths.
Use cases
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.
Arguments
Argument | Type | Description |
---|---|---|
path1 | Text | A file path. Absolute or relative. |
path2 | Text | A relative file path. |
Return value type: Text.
Remarks
If both arguments contain relative paths, then the resulting path will be converted into an absolute path in the current directory.
Examples
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'
See also
syntax/functions/combinepath.1631125577.txt.gz · Last modified: 2021/09/08 14:26 by dmitry