---
title: "saveFile"
canonical: "https://help.vicon.com/space/Shogun112/31228400/saveFile"
format: markdown
---
# Description

Saves native file format to the current filename.

Use saveFile to save your work, maintaining the existing filename or by indicating a new filename. If there is no current filename, you are prompted to supply one.

## Functional area

File handling

# Command syntax

## Syntax

|  |
| --- |
| `saveFile ["filename1"][-e string] [-s] [-append string]` |

### Arguments

| **Name** | **Type** | **Required** | **Comments** |
| --- | --- | --- | --- |
| `filename1` |  |  | Save to the named file |

### Flags

| **Name** | **Flag arguments** | **Argument type** | **Exclusive to** | **Comments** |
| --- | --- | --- | --- | --- |
| `e` | 1 | string | — | Export to named format (e.g. "c3d", "bvh") using string argument |
| `s` | 0 | — | — | Export selected items only |
| `append` | 1 | string | — | String name to be appended to the argument filename (e.g. "_edt") |

## Return value

string array 

> Macro (scroll-pagebreak)

## Examples

```plaintext
saveFile "newFileName.hdf" ;
// The above command saves the current scene to new 
// file called "newFileName".
 
string $Path[] = `saveFile -e csm -s -append _vicon RockOn`;
// Saves the currently selected objects to a file called 
// "RockOn_vicon.csm"
  
print $Path;
```

# Additional information

## Related commands

- [loadFile](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31240270)
- [newFile](https://vicon-help.atlassian.net/wiki/spaces/Shogun112/pages/31231037)