Copy to a single flat directory

Hi, is this already possible or if not is it possible to be added for rclone copy and move, in a scenario where we have files in multiple source directories, is it possible to output them to a single output directory i.e:

Folder 1/File 1 > Remote Folder/File 1
Folder 2/File 2 > Remote Folder/File 2
Folder 3/File 3 > Remote Folder/File 3

I understand the issue of filename conflicts may arise but renaming is a possible solution.

To add more information on my usecase, I have a read only source remote, and another remote that is slow with api calls, so moving lots of files after to a single directory takes alot of time and it would be nice if it could be done on the initial copy.

Thank you

It is not possible with rclone only today but should be rather easy to script.

For single file with given path you simply:

rclone copy source/path/file destination/path/

Now you just get list of all source files (with path) and loop over it executing rclone copy.

Details will depend on your OS and scripting language you use but it should be just few lines of code to have working proof of concept.

On second thoughts I think you could make it even easier and use --files-from filtering flag.

Generate your list and give it a try.

You can get such list by running something like:

rclone lsf --files-only --recursive --format p /root/of/source