Run an external program on torrent completion

Other platforms, generic questions.
Post Reply
DJHH

Run an external program on torrent completion

Post by DJHH »

I don't have experience in programming, I try to Run an external program on torrent completion but is not working.

I put the following: %windir%\system32\notepad.exe "%N", assuming that it will open a text file containing the name of the torrent that has just been completed but nothing happens.

Someone can give a help in that.


Thank you :-\

David
link01

Re: Run an external program on torrent completion

Post by link01 »

Hi David,
notepad.exe does not support a switch to insert text but the echo function can insert that text in.

The command to add text to a file is:

Code: Select all

echo "enter text" > filename.txt
You can chain it to open the text file afterwards:

Code: Select all

echo "enter text" > filename.txt & notepad filename.txt
Works fine in cmd but does not work in qbittorrent. Not sure why but here is my log in case someone knows:

Code: Select all

(N) 2020-01-07T13:20:31 - Torrent: TorrentName, running external program, command: echo "TorrentName" > c:\users\myusername\newtext.txt & notepad newtext.txt
DJHH

Re: Run an external program on torrent completion

Post by DJHH »

Thank you for your time. I tested on cmd and it works, I will continue to do tests. :D
Post Reply