Include-from and consolidate into a single destination

I have created a list of files and directories that I want to upload to an encrypted gdrive. It looks like this:
~# cat locations.lst

/media/dir1/Film1
/media/dir1/subdir1/Film2
/media/dir1/subdir1/Film3.mkv
/media/dir1/subdir1/Film4
/media/dir1/subdir1/Film5.mkv
/media/dir2/Film6
/media/dir2/Film7.mkv

my command however says that there is nothing to copy
rclone -v --dry-run --include-from=locations.lst copy /media/ media_crypt:media/

Is there any way to make this work?

It's relative from your path so you'd remove the /media from your file list.

I think the best might be for me to make a directory filled with symlinks to the referenced files and directories. this will flatten the structure.

I have a follow-up question. I need to check if the file/directory name exists on the gdrive, but it could be anywhere. Is there a more efficient way than this?

while read line; do find . "$line" ; done <list.lst

You don't need to flatten the files if you don't want to, but the paths need to start from the root of the transfer.

You can do

rclone ls --include "filename"

If you are doing this a lot I'd do

rclone lsf -R drive: >file

Then grep the file!

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