====== 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 folder path. Absolute or relative. | |path2|Text |A relative file or folder 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:combineurl|CombineURL(url, path)]].