rclone/docs/content/commands/rclone_move.md

79 lines
2.6 KiB
Markdown
Raw Normal View History

---
title: "rclone move"
description: "Move files from source to dest."
slug: rclone_move
url: /commands/rclone_move/
# autogenerated - DO NOT EDIT, instead edit the source code in cmd/move/ and as part of making a release run "make commanddocs"
---
# rclone move
Move files from source to dest.
## Synopsis
Moves the contents of the source directory to the destination
2017-01-02 16:30:34 +01:00
directory. Rclone will error if the source and destination overlap and
2021-02-02 14:42:35 +01:00
the remote does not support a server-side directory move operation.
2021-02-02 14:42:35 +01:00
If no filters are in use and if possible this will server-side move
`source:path` into `dest:path`. After this `source:path` will no
longer exist.
Otherwise for each file in `source:path` selected by the filters (if
2021-02-02 14:42:35 +01:00
any) this will move it into `dest:path`. If possible a server-side
move will be used, otherwise it will copy it (server-side if possible)
into `dest:path` then delete the original (if no errors on copy) in
`source:path`.
Note that the destination is always a directory. If the path
does not exist, it will be created as a directory and the contents of
the source will be moved into it. This is the case even if the source
path points to a file. If you want to move a single file to a different
name you must use [moveto](commands/rclone_moveto/) instead.
For example, given the command:
rclone move source:sourcepath/one.txt dest:destpath/one.txt
Rclone will create a directory `dest:destpath/one.txt` and put the source file in there:
dest:destpath/one.txt/one.txt
Not move the single source file into the given destination path,
which would be the result if moveto had been used instead:
dest:destpath/one.txt
2017-12-23 14:07:45 +01:00
If you want to delete empty source directories after move, use the --delete-empty-src-dirs flag.
2019-02-09 11:42:57 +01:00
See the [--no-traverse](/docs/#no-traverse) option for controlling
whether rclone lists the destination directory or not. Supplying this
option when moving a small number of files into a large destination
can speed transfers up greatly.
**Important**: Since this can cause data loss, test first with the
2020-09-02 17:59:04 +02:00
`--dry-run` or the `--interactive`/`-i` flag.
2018-11-24 14:44:25 +01:00
**Note**: Use the `-P`/`--progress` flag to view real-time transfer statistics.
```
2017-09-30 15:19:47 +02:00
rclone move source:path dest:path [flags]
```
## Options
2017-09-30 15:19:47 +02:00
```
2019-04-13 12:01:58 +02:00
--create-empty-src-dirs Create empty source dirs on destination after move
2017-12-23 14:07:45 +01:00
--delete-empty-src-dirs Delete empty source dirs after move
-h, --help help for move
```
See the [global flags page](/flags/) for global options not listed here.
## SEE ALSO
2018-10-15 12:03:08 +02:00
* [rclone](/commands/rclone/) - Show help for rclone commands, flags and backends.
2018-03-19 11:06:13 +01:00