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
rclone copy and rclone move diverge in syntax and semantics from their unix counterparts. There are good reasons (efficiency and primary rclone function as a cloud tool) for why rclone move and rclone copy behave the way they do at the moment. Changing them would break many rclone based workflows in the wild.
Let's add new rclone mv and rclone cp which behave exactly like their unix counterparts. One of the things that would be required for these is multiple source parameters.
Originally submitted by @ncw at #4308 (comment)
The implementation details have been discussed in #4308
The all new rclone cp would support a flag like --recurse (or even -R) with semantics close to cp -R (TBD).
Originally submitted by @mrmcmuffinz at #1228 (comment)
A similar request #4776 adds rsync specifics on top of these requirements.
Reacted by Nick Craig-Wood, leko, AGSPhoenix, darkdragon-001, jtagcat, Alejandro Bernal, Marek Jaroš, Piotr Dąbrowski, RePlay-be, danielkrajnik and 9 more
Rephrasing requirements from #1175 in context of this feature request:
Currently moveto does not support moving files to an existing directory.
On the contrary, rclone mv should re-create the semantics of mv. Essentially these should move the file(s) into existing directory:
Currently rclone treats metacharacters (*?) in source file name as part of the name. The new commands will treat them as globs similar to (and on top of) source filter arguments like --include or --exclude.
There is a trick, though. If rclone is run interactively Unix(bash/*sh), user must properly escape metachars to prevent shell globbing and let rclone do the local or remote listing with globbing/filtering and apply many other filtering options.
If source is local then shell globbing would be ok if we allow the new cp/mv (and rsync) verbs to have more arguments than just source and destination so the following command
I think rclone should have a command that has a behavior similar to rsync. The latter has some specifics about trailing slashes that are important to decide how to transfer files.
EDIT: Didn't see that's what the mentioned issue just above is about.
Can you @davinkevin explain exactly what that does? I can then see if I can replicate with rclone as running lots of individual rclone commands is inefficient and you are losing the opportunity for concurrency.
In a folder with 10 subfolders, I would like to copy 3 of them, all starting with the same prefix (folderS-I-want in the previous command).
With the fd --exact-depth 1 folderS-I-want I select everything I want to transfer, and with the sub-sequent --exec rclone copyto --progress {} <dest>:/remote-folder/ I launch the transfer of each… sequentially.
So yes, it's less performant, but I think I have no choice at the moment, we can say to rclone to transfer what we point in the cli (which is the purpose of this issue).
Activity
ncw commentedon Dec 7, 2020
@GG-Sheridan
No. It is quite tricky to replicate the features of
cp/mvand to do so properly would require a lot of knowledge of rclone internals too.ivandeex commentedon Feb 12, 2021
Rephrasing requirements from #1175 in context of this feature request:
Currently
movetodoes not support moving files to an existing directory.On the contrary,
rclone mvshould re-create the semantics ofmv. Essentially these should move the file(s) into existing directory:(
movetowould delete empty existing dir and renamefileto that name, or fail if it's not empty)A similar reasoning holds for
rclone cpvscopyto.ivandeex commentedon Feb 12, 2021
From #2629
As per documentation the following sequence of commands will not try to copy empty directory, just print an informational message
On the contrary, the command
should rather create empty directory on target side (the flag name is tentative).
ivandeex commentedon Mar 31, 2021
Currently rclone treats metacharacters (
*?) in source file name as part of the name. The new commands will treat them as globs similar to (and on top of) source filter arguments like--includeor--exclude.There is a trick, though. If rclone is run interactively Unix(bash/*sh), user must properly escape metachars to prevent shell globbing and let rclone do the local or remote listing with globbing/filtering and apply many other filtering options.
If source is local then shell globbing would be ok if we allow the new
cp/mv(andrsync) verbs to have more arguments than just source and destination so the following commandwill be expanded by the shell to
and rclone will copy all sources.
Exagone313 commentedon Feb 12, 2024
I think rclone should have a command that has a behavior similar to rsync. The latter has some specifics about trailing slashes that are important to decide how to transfer files.
EDIT: Didn't see that's what the mentioned issue just above is about.
davinkevin commentedon Dec 30, 2024
question is this still plan at some point? I use
rcloneas anrsyncreplacement, and it's a pain to deal with this limitation.Currently, I run something like this, kind hacky but it does the job:
However,
rcloneis damn good, and just the fact to have the config saved somewhere is for me the killing feature.ncw commentedon Dec 31, 2024
Can you @davinkevin explain exactly what that does? I can then see if I can replicate with rclone as running lots of individual rclone commands is inefficient and you are losing the opportunity for concurrency.
davinkevin commentedon Dec 31, 2024
In a folder with 10 subfolders, I would like to
copy3 of them, all starting with the same prefix (folderS-I-wantin the previous command).With the
fd --exact-depth 1 folderS-I-wantI select everything I want to transfer, and with the sub-sequent--exec rclone copyto --progress {} <dest>:/remote-folder/I launch the transfer of each… sequentially.So yes, it's less performant, but I think I have no choice at the moment, we can say to
rcloneto transfer what we point in thecli(which is the purpose of this issue).