Cloning directories with files-from.txt

Difficulty with files-from.txt when attempting to clone contents of different directories:

cat files-from.txt:

/user1/Bla1
/user1/Bla2
/user1/Bla3
Bla1, Bla2 and Bla3 are separate directories each with sub-directories and files spread throughout.

does not work:
rclone copy --files-from files-from.txt /home /media/stuff/externaldrive/

I've checked permissions and that should not be an issue.

I'm simply looking for a way for rclone to clone directories based on a list that I provide. All of my directories are below /user1 but I only want to include certain ones and all of their contents.

Thanks!

Files-from is for files as the flag indicates so trying to use it for copying directories would be no good as you found out :slight_smile:

This goes through files-from and the use case:

https://rclone.org/filtering/#files-from-read-list-of-source-file-names

I think you'd want to use filter-from for your use case:

https://rclone.org/filtering/#files-from-read-list-of-source-file-names

and have a filter file like:

 + /user1/Bla1/**
+ /user1/Bla2/**
+ /user1/Bla3/**
- *

So I basically said to copy everything under the first three directories you mentioned and not get anything. It reads top down to find a match.

You can test by using --dry-run or simply just running a rclone ls command to see if the right things are listed as a test too.

Ah, yes - I should have known. Thank you @Animosity022 for pointing out something I should have seen. Me. . . duh! :flushed: