Failed to move: can't sync or move files on overlapping remotes

Quick question.

I want to move all files starting with abc in a remote (at root) to a directory inside that remote. I tried several variants of the following (with and without trailing /)

rclone --include "/abc*" move gdrive:/ gdrive:/DIR -vv --dry-run

and I get the error in the title. Any suggestions? Maybe it's just a /.

I am a new user and sorry for my lack of familiarity with syntax.

Yes, indeed I tried this first:

rclone move gdrive:/abc* gdrive:/DIR

which gives the error "Failed to move: directory not found"

Without wildcard *, it works for one file. The issue is the expansion.

This is all files that start with a, or b or c.

Does it work with abc*:

'rclone move remote:/abc* remote:/DIR -vv'

(like moving abc1, abc2, abc3, ...).

ok. now i understand.
you want to move, from the root of a remote, files that start with abc to a subfolder of that root of the remote named DIR.

you cannot use sync, you cannot use move, but you can use copy.

these commands

echo "----before----"
rclone ls remote:/
rclone lsf remote:/ --include="/abc*" | rclone copy remote:/ remote:/dir --include-from=- -vv
rclone delete remote:/ --include="/abc*"
echo "----after----"
rclone ls remote:/

give this output

----before----
9 abc1
9 abc2
1 abc3
1 abc4
2020/04/21 01:33:11 DEBUG : abc1: MD5 = 25f9e794323b453885f5181f1b624d0b OK
2020/04/21 01:33:11 INFO : abc1: Copied (server side copy)
2020/04/21 01:33:11 DEBUG : abc4: MD5 = c4ca4238a0b923820dcc509a6f75849b OK
2020/04/21 01:33:11 INFO : abc4: Copied (server side copy)
2020/04/21 01:33:11 DEBUG : abc3: MD5 = c4ca4238a0b923820dcc509a6f75849b OK
2020/04/21 01:33:11 INFO : abc3: Copied (server side copy)
2020/04/21 01:33:11 DEBUG : abc2: MD5 = 25f9e794323b453885f5181f1b624d0b OK
2020/04/21 01:33:11 INFO : abc2: Copied (server side copy)
2020/04/21 01:33:11 INFO :
Transferred: 20 / 20 Bytes, 100%, 46 Bytes/s, ETA 0s
Transferred: 4 / 4, 100%
Elapsed time: 0.4s

----after----
9 dir/abc1
9 dir/abc2
1 dir/abc3
1 dir/abc4

Yes, thank you. That should work!

So include works with copy and delete, but not with move:

'rclone --include '/abc*' copy gdrive:/ gdrive:/dir'

'rclone --include '/abc*' delete gdrive:/'

https://rclone.org/filtering/
The filters are applied for the copy, sync, move, ls, lsl, md5sum, sha1sum, size, delete and check operations. Note that purge does not obey the filters

But the following stop on error:

rclone move gdrive:/abc* gdrive:/dir

rclone --include "/abc*" move gdrive:/ gdrive:/dir

The copy and delete behave as expected in bash. Move seems different.

each program has its own syntax and quirks.

Yes, I agree. Thanks a lot for your help!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.