Including specific files and directories

What is the problem you are having with rclone?

How do I include specific files and directories?

Say I have the following directory structure:

├── config.json
├── subdir
│   └── file.ext
└── unwanted
    └── config.json

I'd like to only include the config.json in the base dir as well as everything in subdir. Is there a way to do this in a single call?

When I run

rclone ls . --include "config.json" --include "subdir/**"

the output also includes unwanted/config.json.

Try

rclone ls . --include "/config.json" --include "/subdir/**"

Oh great! I mistakenly assumed that this would denote the (machine) root, so I only tried with ./ which did not work. Thanks.

1 Like