Run command after downloading a file

I was just wondering is it possible to say download a whole folder from my google drive drive which contains multiple files in multiple sub directories, but after a file has fully downloaded somehow to tell rclone to run a command on that file?

Not quite accurate but the closest to what I was trying to explain was similar to using -exec with find on linux.

If we could get an -exec switch in rclone that would be a nice feature I think.

We've thought about this before - there are lots of potential triggers for scripts you could add, not just file downloaded...

I'm pretty sure there is an issue somewhere!

@ncw I appreciate rclone is a different animal, and written in Go, and not Python, but youtube-dl has an -exec flag to do stuff when a file has been downloaded.

If rclone had it, it would be pretty useful to me at least.

Depending on how important the sequence is, you could either do it at the end of the process or if doing it one at a time is important, you could script out the download individually and run a command after each one completes.

Yes I could do it at the end, but then that creates a delay as I would have to wait for all the files to download.

Not sure how I would scripts out the download individually without knowing all the files and the directories they are stored in, the files would still need to be downloaded into the same directory structure that existed in Google Drive. Regardless this feels like an ugly hack rather than a solution unless I have misunderstood something.

I'll probably wait and hope for a solution, I don't actually need to download the files just yet, but if a solution like -exec flag on rclone existed I would of done it now.

Submit a github feature request so you can track it as if that isn't done, nothing will usually happen.

1 Like

could parse the filenames from rclone log file.

I can't seem to see where to do that at? only see how to create an issue, not a feature request.

If you hit "New Issue", you get the page:

Bit confusing so no worries!

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