---
name: "getMissionPath"
type: command
status: ok
groups: ["System", "Mission Information"]
arma3_since: "1.96"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/getMissionPath
revid: 339107
updated: 2023-04-26T10:54:34Z
---

# getMissionPath

*Command · System, Mission Information · Arma 3 v1.96*

## Description

Returns mission root plus the filename in a form of filepath to be used with commands requiring absolute path such as [playSound3D](../commands/playSound3D.md), [drawIcon3D](../commands/drawIcon3D.md), [createSimpleObject](../commands/createSimpleObject.md), etc.
Any leading "\" in the filename will be stripped as the mission root includes one already.

## Syntax

```sqf
getMissionPath filename
```

**Parameters:**

- `filename`: [String](../topics/String.md)

**Returns:** [String](../topics/String.md) - absolute path

## Examples

### Example 1

```sqf
// returns e.g "C:\Users\Username\Documents\Arma 3\missions\MissionName.Altis\icons\myIcon.paa"
private _path = getMissionPath "icons\myIcon.paa";
private _path = getMissionPath "\icons\myIcon.paa"; // leading \ is also fine
```

### Example 2

```sqf
// returns e.g "C:\Users\Username\Documents\Arma 3\missions\MissionName.Altis\" with the trailing \
private _root = getMissionPath "";
```

## See also

[missionConfigFile](../commands/missionConfigFile.md) · [playSound3D](../commands/playSound3D.md) · [drawIcon3D](../commands/drawIcon3D.md) · [createSimpleObject](../commands/createSimpleObject.md) · [Description.ext](../topics/Description.ext.md) · [playSoundUI](../commands/playSoundUI.md)

## Community notes

**Lou Montana** — 2023-04-18

Before the introduction of [getMissionPath](../commands/getMissionPath.md), absolute mission directory could be obtained as follow in config:

```cpp
__EXEC(MISSION_DIRECTORY = __FILE__ select [0, count __FILE__ - 15])
// ...
texture = __EVAL(MISSION_DIRECTORY + "subDirectory\texture.paa");
```

<sub>Source: [BI Community Wiki — getMissionPath](https://community.bistudio.com/wiki/getMissionPath) (revision 339107).</sub>
