Need rclone copy pattern examples


I read the docs for pattern matching files for copy, but it complains about my syntax. I’m sure I’m formatting it wrong and docs didn’t provide clear enough examples for me. I was trying to accomplish something like the following:

rclone copy "A:\local\{foo}" remote:\"remoteFolder" --bwlimit .8M --transfers 10 -v --dry-run

Assuming that I am searching for any files that contain the characters {foo}, I believe I’m putting {foo} in the wrong location. I tried moving the parameter around but didn’t have any luck. What did I do wrong?

I use something like this to match file names for example with 19 in them:

rclone move /movies/ gmedia:Movies --stats 1m -v --include=‘19

I could be more specific and use “(19” but no issues from my side. You can use --dry-run as well to see what it matches.

I edited my first post because I realized i put a bunch of flags at the beginning that were causing copy issues but even trying it with --include=‘foo’

Nothing transfers… although one step closer because you pointed out I forgot --include :slight_smile:

The confusing thing for me was that you don’t include the files on the copy or the move command.

You copy/move one “location” to another “location” as a whole and you have to then break down to include or exclude things in that directory structure. If you don’t want to traverse the directories, you can use the --no-traverse as well.

If you want to move only certain files you can include *.mkv *.mp4 or something like that. I choose file names with years in them as that’s how my movies are setup.

You can do a move by min-age if you are looking to do that.

Well I want to point one location and traverse the directory to look for files that fit the pattern, if it does upload those files to the remote location. Isn’t that what the command would be doing? I shouldn’t have to specify a specific file… I’ll look into it some more as it still didn’t work

So your command up to would be like:

rclone copy "A:\local\ remote:\"remoteFolder" --bwlimit .8M --transfers 10 -v --dry-run --include "FOO"