Files-from flag should accept remotes



The "files-from" flag only accepts a file. It would be nice if it accepted a remote and used its contents as a criterion for the operation.

Lets say I am doing a copy operation from FolderA to FolderB. But I want to copy only those files that exist in FolderC. Currently the way it's done is, first I save the filelist of FolderC to a text file. Then I run the command:

rclone copy FolderA FolderB --files-from filelist.txt

If instead the --files-from flag could accept FolderC as a parameter, it would save the user from having to first create a text file with the list of FolderC contents.

Another use-case is if I am doing a cleanup of my Onedrive and would like to delete only the files that exist locally on my drive.

rclone delete Onedrive:pictures\plants --files-from d:\pictures\plants

Hope it makes sense and is considered to be incorporated in the upcoming versions of Rclone. Perhaps, it'd be nice if 'include-from' and 'exclude-from' too received this feature.

Thanks in advance.

There is an XY problem here (though thankfully you spell out X):

Take a look at --compare-dest and/or --copy-dest. If (and that is an "if") I understand your problem, this may help.

Otherwise, I think this falls into the area of scripting like you're doing being the best option. You could quickly bloat the tool trying to do everything and inevitably break some workflow

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