---
title: "getLastFile"
canonical: "https://help.vicon.com/space/ShogunPost121/1253737673/getLastFile"
format: markdown
---
# Description

Returns the name of the last opened file.

Useful when querying the scene for the last file opened. This gives you the last file imported if there was one imported into the scene.

## Functional area

Data retrieval

# Command syntax

## Syntax

> Macro (scroll-tablelayout)

|  |
| --- |
| `getLastFile [-noExtension]` |

### Arguments

None

### Flags

See above syntax.  


## Return value

string

## Examples

```plaintext
//query the latest file path and 
//print it to the command log
string $temp = `getLastFile`;
print $temp ;
```

# Additional information

## Related commands

- [resetClip](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736672)
- [setActiveClip](https://vicon-help.atlassian.net/wiki/spaces/ShogunPost121/pages/1253736878)