# 6.8.6 CLOSE ALL FILE

Part of: [6 Language](6-language.md) › [6.8 Data Miscellaneous Language (DMISCL)](6-8-data-miscellaneous-language-dmiscl.md)

### Syntax

**CLOSE** **ALL** **FILE**

### Description

Close all HDF5 files in use (i.e. opened). All buffered data will be written into the respective files before closing them. If no file is currently in use or if it is not possible to close a file (due to unknown/unexpected reasons), no subsequent files are closed, and an error is raised.

### Parameter(s)

None

### Return

Nothing

### Example(s)

```hdfql
# use (i.e. open) three HDF5 files named "my_file0.h5", "my_file1.h5", and "my_file2.h5" 
USE FILE my_file0.h5, my_file1.h5, my_file2.h5

# show (i.e. get) all HDF5 files in use (i.e. open) (should return "my_file2.h5", "my_file1.h5", "my_file0.h5")
SHOW ALL USE FILE

# close all HDF5 files in use (i.e. open) 
CLOSE ALL FILE 

# show (i.e. get) all HDF5 files in use (i.e. open) (should return nothing) 
SHOW ALL USE FILE
```
