Question on specifying --include filter

I am trying to use --include filter with the "copy" command on a local filesystem, or SSH with rclone v1.61.1-DEV.

└── my_project/
    ├── sub-001/
    │   └── ses-001/
    │       └── behav/
    │           └── *lots of files*
    └── sub-002/
        ├── ses-001/
        │   ├── epys/
        │   │   └── *lots of files*
        │   └── *lots of files*
        └── ses-002

I have a directory structure like above, that reside in a top-level folder called "local". I would like to copy everything in a select folder, e.g. C:/local/my_project/sub-002/ephys/**. to another folder called "remote"

I have tried a command line
rclone copy "C:/local" "C:/remote" --include "C:/local/my_project/sub-002/ephys/**"

and would like to have only this folder and its contents copied to C:/remote/my_project/sub-002/ephys/"

is such a thing possible? Currently, I believe I am running into issues because of the implicit --exclude ** which is excluding the top level directory my_project. However, if this is the case I cannot figure out how to include it without including every other subfolder.

Thanks a lot!
Joe

Filters are relative paths.

If you test with rclone ls, it's much easier.

change that to something like

--include "/my_project/sub-002/ephys/**"

Test with rclone ls and see if it's doing what you want.

1 Like

Thanks! it was the relative paths that were the issue

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