Is there a batch script for rclone move one file for a time

hello everyone

I am looking for a way to move my download file to GOOGLE Drive.
Because my download job runs on a small size SSD VPS, I have to upload one file and delete it to empty my VPS space for another download job.

For example , I use down a.mp4 to downloads
rclone move dowloads GOOGLE
down b.mp4 to downloads
rclone move dowloads GOOGLE
.................

How can I made a linux shell script for this job?

os: ubuntu Thank you !

hello and welcome to the forum,

you can use the move command
rclone move a.mp4 GOOGLE:

you can use this command
https://rclone.org/commands/rclone_moveto/

and when testing your commands you should use this flag
https://rclone.org/docs/#n-dry-run

How do you download the files? (if you are ok with answering this). Generally all from the same type of source?

Because if it is downloaded as a stream (such as from HTTP, FTP or similar) it should in theory be possible to pipe that file directly into rclone without the need for any temporary local storage if that is so severely limited in your case.

But if the source is something like a torrent it's not going to be feasible - or if you find files from several different platforms (HTTP being one platform in this case) it may be impractical to script.

Just how small of a size are we talking about here though? ... Because if you have at least a little bit to buffer you then a --transfers 1 remote with write-cache and a target-size of 0 might be the easiest and most practical setup by far.

Thanks for your reply
I use such like m3u8 downloader to download stream video.
The downloader use FFMPEG to trans code to h.264 format, and it starts to download and create a temporary file name tmp_a.mp4,finally it rename the file to a.mp4.
I have tried to download video directly to rclone mount drive but it failed.
So I am looking for a linux shell script to do download and upload job.
My vps just has only 20g SSD. My video file is about 6G.
When I download 3 or more files , it runs out my VPS storage.
I am using aria2 to download BT torrent and it can automatically rclone move files to GOOGLE drive
But this downloader is anthoer case.
Thanks again for your patient.

The good news is that there are 1000 ways to do this.
The bad news is that there are 1000 ways to do this. :wink:

Not sure if this addresses exactly your need, but something similar discussed here:

Separately, if you are using a tiny VPS because of $ there are some pretty decent options out there for low $. e.g. Contabo for a few $/euros. Just FYI

I don't know what m3u8 downloader you're using, but I know ffmpeg and youtube-dl both do that.

I prefer a while loop iterating over a list inside a tmux instance.

while read a; do youtube-dl $a; rclone move . remote: --exclude list -P; done < list

Without knowing more about your process, that's my best advice for now.

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