Liquid XML Studio 2019
Data Mapping > Data Mapper Functions > By Category > File > CombinePath

Function Name
Combines several path parts together adding the \ separator
Path Part 1 The first part of the path to add
Path Part 2 The second part of the path to add
... More inputs can be added see Variable Function Inputs
Path The combined path string.
None -

Reads all the values from the inputs and combines them to form a path, adding the path separator \ if required.

Unconnected inputs are ignored.

Sample output

Input Path Part 1 Input Path Part 2 Input Path Part 3 Output
c:\temp\ Folder test.txt c:\temp\Folder\test.txt
c:\temp Folder test.txt c:\temp\Folder\test.txt
c:\temp \Folder test.txt \Folder\test.txt
c:\temp Folder\ test.txt c:\temp\Folder\test.txt
c:\ temp \Folder\test.txt \Folder\test.txt
c:\ temp Folder\test.txt c:\temp\Folder\test.txt
temp Folder test.txt temp\Folder\test.txt
.\temp Folder test.txt temp\Folder\test.txt
..\temp Folder test.txt temp\Folder\test.txt
c:\temp .\Folder test.txt c:\temp\.\Folder\test.txt
c:\temp ..\Folder test.txt c:\temp\..\Folder\test.txt
..\temp test.txt ..\temp\test.txt

Output in XSLT may differ slightly


A range of functions are provided for working with Uri's and Path's. The following example demonstrates how these can be used.


In the following example we have a directory c:\UriExamples\ that contains the files Bookstore.xsd, Input001.xml, Input002.xml & ResolvedUri.Output.xml.

In our transform we have configured "ListFiles" to operate on the directory "c:\UriExamples\" and use the pattern "Input*.xml"

As you can see the ListFiles component gets the full paths of all the files that match the pattern. These filenames are then fed into the various Uri functions and output into an XML writer.

The result of the transform is as follows

Transform Output
Copy Code

Lets examine the output in more detail


Native Execution Engine, XSLT 2.0, C#

This is a scalar function so the standard rules apply if multiple values are presented to one or more inputs.

See Also

Data Mapping