Page 2 of 2

Re: How to run .bat script on torrent completion?

Posted: Wed Mar 25, 2020 11:25 am
by mhertz
Are you asking help for another program on deluge forum lol :)

Anyway, if you actually meant deluge, then sometimes some have issues with execute plugin on atleast some windows versions, no matter how adapting the path, e.g backwards-slash, double backwards-slash and forward-slash or double forward-slash. There where reported most success, I believe, by making and placing bat file in deluge install-dir, and add it to execute-plugin as just name.bat, without quotes or anything. Then in batch file, add command-lines wanted, one on each line and use variables for the arguments i.e the variables in deluge is:

Code: Select all

set torrentid=%1
set torrentname=%2
set torrentpath=%3

You don't need add above, but just need use the % numbers correct place in your arguments, and if adding above instead, then instead use the descriptive variable-names as arguments instead e.g %torrentpath% instead of %3 etc and add double-quotes for %2 and %3(or its descriptive names if used instead) just in case if spaces occurring there.

Last, don't test with torrents added before, so without downloaded data already available, Cas stated once, but maybe only for the use case of testing things out using some echo lines to new txt-file using 'added' event, dunno, but just in case regardless.

Good luck.