Is there a way to provide numerical range to `--include` flag?

What is the problem you are having with rclone?

I'm hoping to download a subset of files instead of all files. Given:

  • holiday_pic_XXXX.jpg, where XXXX is a number from 0000 to 9999

I wish to download just pics in some range (eg: [320, 590], inclusive). Is there a way to provide this information without repeating (ala --include holiday_pic_0320.jpg --include holiday_pic_0321.jpg ... --include holiday_pic_0590.jpg)?

Run the command 'rclone version' and share the full output of the command.

rclone v1.62.2
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.4.0-150-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.20.2
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)


Have a look at this thread - it should give you some ideas:

For numeric range you have to be a bit creative - but easily doable.

more details in docs:

experiment using --dry-run -vv flags until you get result you are happy with.

If you need more complex selections you have to use regular expressions, e.g.:

Regex for range 1 to 127 is

Ah regex my old nemesis. I guess it's time to create a regex generator to make my life easy

Thanks for the info :slight_smile:

1 Like

You can use this one

Which will create a regexp matching a range of numbers, with or without leading zeroes.

1 Like

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