# mkdir {#mkdir}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`mkdir(directory)`

## Arguments {#arguments}

**directory** the path of the directory to be created.

## Details {#details}

Create a directory. It must be executed by a logged-in user.

## Examples {#examples}

```
files("/home/test");
```

|filename|isDir|fileSize|lastAccessed|lastModified|
|--------|-----|--------|------------|------------|
|dir3|1|0|1496649999597|1496649999597|

```
mkdir("/home/test/dir1");
mkdir("/home/test/dir2");
mkdir("/home/test/dir3");
// output: The directory [/home/test/dir3] already exists.
```

```
files("/home/test");
```

|filename|isDir|fileSize|lastAccessed|lastModified|
|--------|-----|--------|------------|------------|
|dir1|1|0|1496651628372|1496651628372|
|dir2|1|0|1496651645598|1496651645598|
|dir3|1|0|1496649999597|1496649999597|

