---
title: "getSavePath"
canonical: "https://help.vicon.com/space/Shogun17/13536625/getSavePath"
format: markdown
---
# Description

Returns the default directory that Shogun Post's **Open** and **Save As** dialog boxes initialize to, or the default directory of the Export dialog if the `-e` flag is specified.

Shogun's **Open** and **Save** dialog boxes share their default values. However, the **Import** and **Export** dialog boxes have different default values. The values of these may be set using the [setSavePath](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537152) command. The values also get updated whenever you use the dialog boxes.

For all file and directory paths, use forward-slashes instead of back-slashes.

To get the full path of the currently loaded file, use getSavePath to get the location that the file was opened from, followed by [getSceneName](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536621) to get the name.

## Functional area

System

# Command syntax

## Syntax

|  |
| --- |
| `getSavePath [-fullPath] [-e]` |

### Arguments

None

> Macro (scroll-pagebreak)

### Flags

| **Name** | **Flag arguments** | **Argument type** | **Exclusive to** | **Comments** |
| --- | --- | --- | --- | --- |
| `fullPath` | 0 | — | — | This flag will add the scene name and ".vdf" extension to the returned path. By default, just the directory is returned. |
| `e` | 0 | — | — | This flag will return the default directory thatShogun Post's **Export** dialog initializes to instead of the **Open** and **Save** dialog boxes default. |

## Return value

string

Returns the full path to the default directory that Shogun Post's **Open** and **Save As** dialog boxes initialize to.

## Examples

```plaintext
// Launch the file dialog and get the directory location that they chose
loadFile;
 
// Should return the directory of the file the user chose in the 
// Open File dialog.
string $str = `getSavePath`;
print $str;
```

# Additional information

## Related commands

- [getSceneName](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13536621)
- [setSavePath](https://vicon-help.atlassian.net/wiki/spaces/Shogun17/pages/13537152)