You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Change moveto/copyto support moving a file to an existing directory #1175
Currently moveto/copyto do not support moving files to an existing directory. That is, it seems to provide only a "rename" capability rather than following conventional move/copy semantics that support moving (potentially multiple) items to a destination target directory. Essentially I think these should work:
$ touch file
$ mkdir existdingdir
$ rclone moveto -vv file existdingdir
2021/02/12 11:30:08 DEBUG : rclone: Version "v1.55.0-beta.5177.4d83a9899.add-scsu-tables" starting with parameters ["rclone" "moveto" "-vv" "file" "existdingdir"]
2021/02/12 11:30:08 DEBUG : Creating backend with remote "file"
2021/02/12 11:30:08 DEBUG : Using config file from "/home/ncw/.rclone.conf"
2021/02/12 11:30:08 DEBUG : fs cache: adding new entry for parent of "file", "/tmp"
2021/02/12 11:30:08 DEBUG : Creating backend with remote "."
2021/02/12 11:30:08 DEBUG : fs cache: renaming cache item "." to be canonical "/tmp"
2021/02/12 11:30:08 ERROR : Attempt 1/3 failed with 1 errors and: "existdingdir": is not a regular file
2021/02/12 11:30:08 ERROR : Attempt 2/3 failed with 1 errors and: "existdingdir": is not a regular file
2021/02/12 11:30:08 ERROR : Attempt 3/3 failed with 1 errors and: "existdingdir": is not a regular file
2021/02/12 11:30:08 INFO :
Transferred: 0 / 0 Bytes, -, 0 Bytes/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 0.0s
2021/02/12 11:30:08 DEBUG : 2 go routines active
2021/02/12 11:30:08 Failed to moveto: "existdingdir": is not a regular file
So the request is, if the destination in an rclone moveto command is an existing directory then move the file into that directory.
I think what we are re-creating is the semantics of mv, so this issue should probably be merged with the rclone mv and rclone cp issue where we recreate exactly the semantics of those unix commands in rclone.
Making new commands for this that mirror unix semantics seems like a good idea if retaining the current behavior is needed. Although this ticket predates the other by quite a long time.
Making new commands for this that mirror unix semantics seems like a good idea if retaining the current behavior is needed.
copy/move grew organically driven by popular demand and gathered some legacy. there is a slew of requests change behavior of copy/move to make it like windows/linux/whatever. otoh there is a good risk that if we do that, we'll get another wave of requests claiming rclone broke their processes in various tricky ways. thus the former requests get stuck in discussions about a myriad of ugly "--give-me-new-x-but-dont-break-his-old-y" flags and their combinations. they take a share of 600+ tickets, waiting for years. i'm not sure if having new commands is good or bad. hopefully it will get some "--x-y-blah" knots untangled.
Although this ticket predates the other by quite a long time.
if it helps this request get fullfilled eventually, so what's bad.
Activity
ncw commentedon Feb 26, 2017
I've fixed that in 79e3c67
The rest I'll do in 1.37
ivandeex commentedon Feb 12, 2021
Closing after 4 years of inactivity
eharris commentedon Feb 12, 2021
It seems like this was accepted by @ncw, but hasn't been implemented/resolved yet. So why close?
ivandeex commentedon Feb 12, 2021
@ncw What is status of this ticket? It was not updated since 2017. User says it was accepted. Do you still remember?
ncw commentedon Feb 12, 2021
The problem still exists
So the request is, if the destination in an
rclone movetocommand is an existing directory then move the file into that directory.I think what we are re-creating is the semantics of
mv, so this issue should probably be merged with therclone mvandrclone cpissue where we recreate exactly the semantics of those unix commands in rclone.That's #4777
ivandeex commentedon Feb 12, 2021
@ncw ok
@eharris see #4777 (comment) ok with you?
ivandeex commentedon Feb 12, 2021
Merged into #4777 (comment)
eharris commentedon Feb 12, 2021
Making new commands for this that mirror unix semantics seems like a good idea if retaining the current behavior is needed. Although this ticket predates the other by quite a long time.
ivandeex commentedon Feb 13, 2021
copy/move grew organically driven by popular demand and gathered some legacy. there is a slew of requests change behavior of copy/move to make it like windows/linux/whatever. otoh there is a good risk that if we do that, we'll get another wave of requests claiming rclone broke their processes in various tricky ways. thus the former requests get stuck in discussions about a myriad of ugly "--give-me-new-x-but-dont-break-his-old-y" flags and their combinations. they take a share of 600+ tickets, waiting for years. i'm not sure if having new commands is good or bad. hopefully it will get some "--x-y-blah" knots untangled.
if it helps this request get fullfilled eventually, so what's bad.