# <path>

Paths are groups of files and/or directories that need to be passed as a single unit. The order in which parts of the path are specified in the build file is retained, and duplicate parts are automatically suppressed.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
id | string | The ID used to be referenced later. | False
refid | string | The ID to use as the reference. | False

### Nested Elements:

#### <path>

Defines a set of path elements to add to the current path.

#### </path>

#### <pathelement>

Defines a path element to add to the current path.

Represents a nested path element.

### Parameters

Attribute | Type | Description | Required
--- | --- | --- | ---
dir | directory | The name of a directory to add to the path. Will be replaced with the absolute path of the directory. | False
file | file | The name of a file to add to the path. Will be replaced with the absolute path of the file. | False
if | bool | If true then the entry will be added to the path; otherwise, skipped. The default is true. | False
path | <path> | A string that will be treated as a path-like string. You can use `:` or `;` as path separators and NAnt will convert it to the platform's local conventions, while resolving references to environment variables. | False
unless | bool | Opposite of `if`. If false then the entry will be added to the path; otherwise, skipped. The default is false. | False

#### </pathelement>

### Examples

- Define a global `<path>` that can be referenced by other tasks or types.

                          <path id="includes-path">
                              <pathelement path="%INCLUDE%" />
                              <pathelement dir="${build.dir}/include" />
                          </path>

### Requirements

Assembly: NAnt.Core (0.90.3780.0)