# GetUnitFolder

> Gets the folder for a unit.

Source: https://docs.capaone.com/capainstaller/sdk-capainstaller-software-development-kit-functions/unit-functions/getunitfolder/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

## Description

Gets the folder for a unit

## Syntax

GetUnitFolder(Byval UnitName as String, Byval UnitType as String) as String

## Parameters

***UnitName (String)***

The name of the unit

***UnitType (String)***

Type of Unit

- "Computer"
- "User"

## Return value

String. If the unit is placed in a folder, its folder structure will be returned in the format: Folder1\Folder2\. If it is not located in a folder an empty string will be returned.

## Example

**VBScript**

```vb
Set oCMS = CreateObject("CapaInstaller.SDK") 
wscript.echo oCMS.SetInstanceManagementPoint("1") 
Set aUnit =  oCMS.GetUnitGroups("Klient","Computer") 
wscript.echo oCMS.GetUnitFolder("Klient","Computer")
```
