How to copy using a wildcard

After a little help (why else post) i have done some googling but so far not come accross an answer that works.
Have installed rclone on ubuntu 20.04 and have it working with two remote drives.
What i am trying to do is copy or move folders from one drive to the other, seems simply but i cant get any form of wildcard to work.
rclone copy drive1:/a* drive2: --progress --bwlimit 20m
results in nothing just errors, like i said i have googled and i get examples that say it cant be done, others that say put in speachmarks do /"a*" none of these work.
Ultimately i just want to move to reduce size of drive one and split but on a folder by folder basis so was thinking alphabetically so in the end drive 1 does a-j and k-z on drive 2.
Anyone have examples of this working?

see --include and dir filtering

first play with rclone and verify what would be copied:

rclone copy drive1: --include "/a*/**" drive2: --dry-run --verbose

act when satisfied:

rclone copy drive1: --include "/a*/**" drive2: --progress --bwlimit 20m

hello and welcome to the forum,

if you have a lot of folders, you can use --include-from
create a text file, let's call it include.txt
and add the include folders like so


and the command would look like

rclone copy drive1: --include-from include.txt drive2: --dry-run --verbose

Thankyou so i could script it in effect by using a txt file so if it does each line in sequence that would save me allot of hasle.

correct, and the safeest way to test filtering is using rclone ls, as that will show you what would be copied without actually copying anything...

rclone ls drive1: --include-from include.txt --verbose

... --dry-run !!


for rclone copy, yes i agree, test with --dry-run

for rclone ls, not sure the need for --dry-run?

1 Like

Right, not needed for ls.
My eyes just missed the ls.

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