> ## Documentation Index
> Fetch the complete documentation index at: https://docs.diversion.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# mv

> ワークスペース内のファイルまたはディレクトリを移動またはリネームする

`mv` コマンドは、ワークスペース内のファイルまたはディレクトリを移動またはリネームします。

```bash theme={null}
dv mv --src_path <src_path> --dst_path <dst_path> [--workspace_id <workspace_id>]
```

**必須パラメータ:**

* `--src_path` - 移動元のファイルまたはディレクトリのパス
* `--dst_path` - 移動先のパス

**オプションのパラメータ:**

* `--workspace_id` - 移動を行うワークスペースの ID（デフォルトは現在のワークスペース）

このコマンドは、ワークスペースの構造を整理し直したり、プログラム的にファイルをリネームしたりするのに便利です。

ファイルを移動する例：

```bash theme={null}
dv mv --src_path /old/location/file.txt --dst_path /new/location/file.txt
```

ファイルをリネームする例：

```bash theme={null}
dv mv --src_path /assets/old_name.png --dst_path /assets/new_name.png
```

ディレクトリを移動する例：

```bash theme={null}
dv mv --src_path /game/old_folder --dst_path /game/new_folder
```

<Note>
  `mv` を使用した後、移動やリネームをブランチに保存するには変更をコミットする必要があります。
</Note>
