path¶
Join file path components into a Windows-style path string.
Use this in variable-library formulas to build paths for functions such as
csvToTable.
path(part1, part2, ...)
Each argument is a string containing a folder, file name, or path. You can supply any number of arguments.
| Formula | Result |
|---|---|
path() |
. |
path("data", "rates.csv") |
data\rates.csv |
path("C:/Models", "Input data", "rates.csv") |
C:\Models\Input data\rates.csv |
path("data/inputs", "rates.csv") |
data\inputs\rates.csv |
path("C:/Models", "D:/Inputs", "rates.csv") |
D:\Inputs\rates.csv |
Both / and \ are accepted as separators. The result uses \.
An absolute component with a drive letter replaces the preceding path.
A component beginning with \ replaces the preceding folders but keeps the drive, if present.
UNC paths such as \\server\share are also supported.
For example:
csvToTable(path("data", "rates.csv"))
path() only constructs a string. It does not check whether the path exists,
create folders, or turn a relative path into an absolute path.
The function receiving the path determines how relative paths are resolved.