---
title: "setDir"
canonical: "https://help.vicon.com/space/Shogun16/13340152/setDir"
format: markdown
---
# Description

Specifies the current working directory.

The current directory is used by some Windows system commands. By default, the current directory is the Shogun Post root directory.

## Functional area

System

# Command syntax

## Syntax

|  |
| --- |
| `setDir "folderPath"` |

### Arguments

> Macro (scroll-tablelayout)

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `folderPath` | string | yes | Path to serve as the current directory. This path must use forward slashes and may not be more than 260 characters long. |

### Flags

None

## Return value

boolean

Returns true if the operation was successful.

## Examples

```plaintext
// Set the new working directory to be our temp folder.
boolean $wasSuccessful = `setDir "C:/Temp/"`;
print $wasSuccessful;
```