NAnt SDK Documentation - v0.92 |

# EnvironmentFunctions.GetFolderPath Method

Gets the path to the system special folder identified by the specified enumeration.

[Visual Basic]
<Function(Name:="get-folder-path")>
Public Shared Function GetFolderPath( _
ByVal folder As SpecialFolder _
) As String
[C#]
[Function(Name="get-folder-path")]
public static string GetFolderPath(
SpecialFolder folder
);

#### Parameters

folder
  An enumerated constant that identifies a system special folder.

#### Return Value

The path to the specified system special folder, if that folder physically exists on your computer; otherwise, the empty string ("").

#### Exceptions

Exception Type | Condition
--- | ---
ArgumentException | folder is not a member of SpecialFolder.

#### Example

Copy "out.log" from the project base directory to the program files directory.

    <copy file="out.log" todir="${environment::get-folder-path('ProgramFiles')}" />

#### See Also

EnvironmentFunctions Class | NAnt.Core.Functions Namespace