I have some scripts downloading videos from live streaming websites. Those scripts download live streams constantly, and at some point, either the file has reached it's maximum recording length, or the streamer has finished streaming, the file will be completed.
I want to move those complete files to remote once they are finished, and leaving nothing in the folder once they have been moved. I'm not sure if I can use rclone move constantly with cron to move all files in a folder to remote without having to write more lines to check if the files has been completed. If not, what's the good command I can use?
Hopefully the same command can be used to files downloaded by torrent.
Only software aware of files' status (finished or not) is your download script or torrent software. So make them move finished files to some other local location where rclone can pick them up. For example every torrent client I know has option to move finished files to specific location.
rclone simply asks your OS to a read file - if your OS allows it then rclone does its job. If your other software/OS locks a file than rclone will fail. It does not have any special ability to detect if file is used by other software or not.
Only reliable way to achieve what you are asking for is to make sure that rclone access already "finished" files. Let's say you are downloading torrent. It might be slow and nothing is happening for 1h. Only your torrent program knows that it is not finished yet. There is no way for other software to know it.