# Move a file

Launch stage: GA

`POST /api/2.0/dbfs/move`

Moves a file from one location to another location within DBFS.
 If the source file does not exist, this call throws an exception with `RESOURCE_DOES_NOT_EXIST`.
 If a file already exists in the destination path, this call throws an exception with `RESOURCE_ALREADY_EXISTS`.
 If the given source path is a directory, this call always recursively moves all files.

API scopes: files

## Request body

- `destination_path` (string, required)
  The destination path of the file or directory. The path should be the absolute DBFS path.
  Example: `/mnt/bar`
- `source_path` (string, required)
  The source path of the file or directory. The path should be the absolute DBFS path.
  Example: `/mnt/foo`

## Request

```json
{
  "destination_path": "/mnt/bar",
  "source_path": "/mnt/foo"
}
```

## Responses

### 200

Request completed successfully.

## Response

```json
{}
```
