Folder monitor and move for gdrive in windows

I have folder, lets say

D:\rclone

my torrent download moving to that directory. is there anyway we can use folder monitor and rclone move file to gdrive? we can use scheduler command. but that will not work, because if previous upload not finish rclone will add ongoing uploading file task to upload again.

which torrent application do you use?
i use qtorrent but all torrent programs are the same.

  1. when a torrent has finished, qtorrent can move it to a folder.
  2. when a torrent has finished, qtorrent can run a command.


There are absolutely ways to script this (the --min-age flag comes in handy)...
But as asdffdsa correctly points out the absolutely easiest and cleanest solution is to use a torrent client that supports a "temporary download folder" option. ie. a folder where incomplete torrents are stored before being moved to the final destination once complete. Then it's as simple as setting the temp-folder to a local destination, and the final folder directly to the drive and the torrent-client will just take care of itself without needing any special workarounds.

Qbittorrent has this, but also several other clients - and many also have a script-hook for "perform this action when a torrent has completed". That also provides a very easy way of inserting a simple "move-to-cloud" command, so that is almost as good if slightly less convenient.

hi,
how would use --min-age to ensure a torrent file is not still in the process of downloading and not yet completed?

Well, each time the file is being written to it will get a new modtime, because the whole problem with these types of programs is they open and close the file a lot. If they just kept it open it would block the upload to begin with and there wouldn't be an issue. We don't want to try to transfer it while it is being written to - even though those writes might come with small pauses in-between.

If you set something like --min-age 1h then you should be fairly certain of the file being "cold" before it gets uploaded and thus avoid the problem. You probably don't need that much, but I'd leave some leeway in case of weird edge-cases, and I'm not sure if the client would react well to any files being moved until the whole torrent is done. (would depend on setup and maybe this would work ok on a union-style setup).

I haven't had a need to use this in practice since I just use the in-built temp-folder function in my torrent client which is immune to any weird edge-cases out of the box, but in principle this should work.

the reason i asked was, i could not think of any possible solution using --min-age and wanted to know if there was a solution i was missing out on.
based on your reponse there is no such solution to be had.
thanks

Curious as to why you would say that. Is it because it won't necessarily cover all possible edge-cases and relies on a margin of error?
If you think I'm just wrong you have to say why and not just be so vague :stuck_out_tongue:

really, if i thought that, i would not summon you for other posters as i often do.
it's not you, it's me!
i am sure there is a emoji to be used here, but emojis scare me.

remember, i run paranoid and as you wrote stuff that 'scares' me.

  1. "won't necessarily cover all possible"
  2. "relies on a margin of error"

my data are my children, and i love every bit of them.

Alright, then I understand. I fully acknowledge it's not a theoretically perfect solution. That's why I don't prefer it myself when perfect solution does exist. I just want to know what you think because if I'm wrong then I want to know about it so I can correct myself.

Data should never be lost like this, but you might have an error-stall on occasion because a access happened exactly in the short handover window. (needing a resume, and possibly a re-check).

Ultimately it is much better to do it cleanly from within the torrent client, and there are plenty of good clients that support features that make that possible. It's a nice option to know about though in case you ever need to deal with similar issues in other programs that don't have any such options.

For example, many rendering programs use temporary files. You definitely don't want to upload those, and maybe they are not easy to just filter out since they could share names and extensions that you generally do not want to ignore. In that case min-age should work almost perfectly to ignore the temporary working files as the file-access there isn't nearly as unpredictable. Torrent clients really are about the worst-case possible.

if you ever zork, if you were ever in the troll room, you would understand.

yeah thats what i doing. temporary folder torrent client downloading. then it's moving to other folder.

after that what should i do? should i run a scheduler bat command for rclone upload to gdrive as move?

assume command running every 1 hour. but if previous upload is still ongoing, rclone command will try to upload the old file again.

When you have that feature you can just have the torrent client move it straight to the final cloud destination. Doing it via an extra scripting step seems unnecessary unless you need very spesific control over the operation that the normal VFS-upload won't give you.

so you are suggesting to use rclone mount and set the final dest be the mount?
if it is a simple file copy, then vfs is not needed?
the mount overhead will slow uploads so why not this?

:loop
rclone move c:\location.of.finished.torrents\ gdrive:torrents
timeout 3600
goto loop

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