Array of Strings to Path Function

Owning Palette: Path/Array/String Conversion Functions

Requires: Base Development System

Converts an array of strings into a relative or absolute path.

If you have an empty string in the array, the directory location before the empty string is deleted in the path output. This behavior is similar to moving up a level in directory hierarchy.

Details  

 Add to the block diagram  Find on the palette
relative indicates whether you want to create a relative path or an absolute path. If TRUE, the function creates a relative path. If FALSE (default), the function creates an absolute path. If FALSE and the path specified is not valid as an absolute path (for example, the path means go up a level), the function sets path to <Not A Path>.
array of strings contains the names of the components of the path you want to build. The first element is the highest level of the path hierarchy (the volume name, for file systems that support multiple volumes), and the last element is the last element of the hierarchy. An element that contains an empty string tells LabVIEW to go up a level in the hierarchy.
Note  Each string in the array of strings must represent a single element of the complete path. Partial paths, such as test\subtest, are not valid as array elements because they might produce invalid paths on platforms that use different directory separators.
path is the resulting path.

Array of Strings to Path Details

Suppose the path to the VI containing this function is c:\dir1\main.vi. To use this function to build a relative path to another VI such as c:\dir1\dir2\called.vi, wire TRUE to relative. In array of strings, enter dir2 as the first element and called.vi as the second element. The function returns a relative path of dir2\called.vi. You can use the Build Path function to append the relative path to the output of the Current VI's Path function.

To build an absolute path to c:\dir1\dir2\called.vi, wire FALSE to relative. In array of strings, enter c as the first element, dir1 as the second element, dir2 as the third element, and called.vi as the fourth element. The function returns an absolute path of c:\dir1\dir2\called.vi.