---
name: "exec"
type: command
status: ok
groups: ["Program Flow"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/exec
revid: 325305
updated: 2022-07-10T22:55:34Z
---

# exec

*Command · Program Flow · Arma 3 v0.50 · introduced in Operation Flashpoint v1.00*

## Description

Execute a script using (the deprecated but still available) SQS Syntax. [SQF Syntax](../topics/SQF_Syntax.md) (and [execVM](../commands/execVM.md)) is the most recent scripting language.

The magic variable [_time](../topics/Magic_Variables.md#time) used within the script contains the elapsed time in seconds since the script started.

> [!NOTE]
> To see the active SQS scripts currently in the scheduler, use [diag_activeSQSScripts](../commands/diag_activeSQSScripts.md) command.

## Syntax

```sqf
argument exec script
```

**Parameters:**

- `argument`: [Anything](../topics/Anything.md) - the argument passed to the script through the [_this](../topics/Magic_Variables.md#this) variable. To pass multiple arguments, use an [Array](../topics/Array.md).
- `script`: [String](../topics/String.md) - the file path to the script. It should be given relatively to the mission folder, campaign scripts subfolder or global scripts folder and is searched there in the same order.
  If you refer to a script packed together with an addon, the path should look like this: "\ADDON_PBO_NAME\script.sqs" where ADDON_PBO_NAME is the name of the addon's PBO file without extension.

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqs
[player, _jeep] exec "getin.sqs";
```

## See also

[execVM](../commands/execVM.md) · [call](../commands/call.md) · [spawn](../commands/spawn.md) · [execFSM](../commands/execFSM.md)

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