MOVE
Move items with the Unity Version Control CLI.
読み終わるまでの所要時間 1 分最終更新 9ヶ月前
Description
Moves or renames a file or directory.
Usage
cm move | mv <src_path> <dst_path> [--format=<str_format>] [--errorformat=<str_format>]
Options
Option / Argument | Description |
|---|---|
| --format | Retrieves the output message in a specific format. See Remarks for more info. |
| --errorformat | Retrieves the error message in a specific format. See Remarks for more info. |
| src_path | Source item path. |
| dst_path | Destination item path. |
Help
Remarks
This command moves or renames an item in the repository. Changes are done in the local filesystem too.
If the source path is a file, the destination path can be a file or a directory. In the first case, the file is renamed; otherwise, the item is moved.
If source path is a directory, the destination path must be a directory.
The item to move or rename must exist.
Format
Option / Argument | Description |
|---|---|
| Source path (both for '--format' and '--errorformat') | |
| Destination path (both for '--format' and '--errorformat') |
Examples
cm move file.txt file.old
(Renames the item.)
cm mv .\file.old .\oldFiles
(Moves 'file.old' to 'oldFiles'.)
cm move .\src .\src2
(Renames a directory.)