rclone is an excellent tool that we use. but we are in need of a little urgent adjustment. I will explain below:
example: the files with its created time
local | remote file16h | flle16h file17h | file17h file18h | file19h | file20h | file20h
rclone move --check-first --order-by modtime,ascending
the files with created time 18h and 19h that are not in the remote backend yet will be copied respectind the
--check-first and the
--order-by modtime,ascending is applied perfectly.
the files with created time 16h, 17h and 20h that are ALREADY in the remote backend will just be deleted and are not respecting the perfect ordering. The file created after (file17h) can be deleted first than file before (file16h). file20h can be deleted before everybody.
We use this command with
--max-delete and lot of files. So the files that should be deleted first are the oldest ones.
The files should be moved as follows whether or not they already exist in remote backend: file16h > file17h > file18h > file19h > file20h
We write a code bellow that could help. What would be the best way to try to improve this?