Compare Two Paths VI

LabVIEW 2018 Help

Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)

LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Owning Palette: Advanced File VIs and Functions

Requires: Base Development System

Compares Path 1 to Path 2 and returns a relative path between the two paths, the common path between the two paths, and a Boolean that indicates whether the paths are on the same path hierarchy level.

For example, if Path 1 is C:\folder\sub\test.txt and Path 2 is C:\folder\sub2\dir\test2.doc, Relative Path from 1 to 2 returns ..\..\sub2\dir\test2.doc. Common Path returns C:\folder, and Path 2 Relative to Path 1 returns FALSE because you have to go up two levels in the path hierarchy to get to the common path between Path 1 and Path 2.

Path 1 specifies the first path.
Path 2 specifies the second path.
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Relative Path from 1 to 2 returns the relative path you have to take on disk to get from Path 1 to Path 2.
Common Path returns the part of the absolute path that Path 1 shares with Path 2.
Path 2 Relative to Path 1? is TRUE if Path 1 is on the same directory level as Path 2. Otherwise, this output is FALSE.
error out contains error information. This output provides standard error out functionality.


Not Helpful