# PetscMkdtemp
Create a folder with a unique name given a filename template. 
## Synopsis
```
PetscErrorCode PetscMkdtemp(char dir[])
```
Not Collective


## Input Parameters

- ***dir -*** file name template, the last six characters must be 'XXXXXX', and they will be modified upon return





## See Also
 `PetscMkdir()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/fileio/fdir.c.html#PetscMkdtemp">src/sys/fileio/fdir.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/fileio/fdir.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
