Can --files-from flag be used exclude-from while running copy command?

Can --files-from flag be used with --exclude-from flag while running copy command ?

I have a scenario where copy command is being run with --files-from flag. This means that it is moving those files which are specified in files-from flag.

But I also want to filter out some files (in my case, it is 'thumbs.db') while running copy command with --file-from flag. The agenda of filtering out can be achieved --exclude-from. But filtering out of files is not happening if I use --files-from flag with --exclude-from flag.

Example Command (which I intend to use)-
rclone.exe copy --files-from C:\path\to\file --exclude-files C:\path\to\exclude.files.txt

where exclude-files.txt contains patterns against which file/folder names are going to be matched.

No, you can't. It is documented here:

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

What would be the best way to exclude some files provided with --files-from option?

You'll have to filter the --file-from file, maybe with sed first.

In case we have a large data set ( millions of files) do we get any performance benefit by using --file-from vs not using this option.

I'd probably start a new post and ask your question with specifics rather than hijacking this one.

Sure. I started a new post for this question.

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