Page 1 of 3
Trying to run a .bat file when torrent completes
Posted: Thu Oct 02, 2014 6:11 pm
by ambreswe
Hi there!
Not sure Deluge supports the running of .bat files?
I've tried with:
"Torrent Complete: D:\7zip_unpack_deluge.bat"
"Torrent Complete: D:/7zip_unpack_deluge.bat"
Put it in the Deluge folder "Torrent Complete: 7zip_unpack_deluge.bat"
It's just a simple script that should outout the variables, to see if they're correct, and then pause.
However, nothing happens and there's no error.
Please assist
Code: Select all
rem @echo off
torrentid=$1
torrentname=$2
torrentpath=$3
echo "Torrent Details: " $torrentname $torrentpath $torrentid
pause
Cheers!
Re: Trying to run a .bat file when torrent completes
Posted: Thu Oct 02, 2014 11:35 pm
by Cas
Try with double forward-slash in path, iirc it should work.
Re: Trying to run a .bat file when torrent completes
Posted: Fri Oct 03, 2014 5:06 am
by ambreswe
Cas wrote:Try with double forward-slash in path, iirc it should work.
Will try, cheers.
Re: Trying to run a .bat file when torrent completes
Posted: Fri Oct 03, 2014 5:40 am
by ambreswe
"Torrent Complete: D://7zip_unpack_deluge.bat"
Nope, that does nothing, please advise.
Re: Trying to run a .bat file when torrent completes
Posted: Fri Oct 03, 2014 11:34 am
by Cas
Sorry it should have been double-backslash but that shouldn't matter, a normal windows path such as D:\ with be converted anyway.
You won't see an output, you would need it to write to a log so this is the equivalent to the example bash script:
Code: Select all
@echo off
set torrentid=%1
set torrentname=%2
set torrentpath=%3
@echo Torrent Details: %torrentname% %torrentpath% %torrentid% >> C:\execute_script.log
Re: Trying to run a .bat file when torrent completes
Posted: Sat Oct 18, 2014 1:09 pm
by ambreswe
Oh ok, I'll give that a shot

Re: Trying to run a .bat file when torrent completes
Posted: Sat Oct 18, 2014 1:27 pm
by ambreswe
Cas wrote:Sorry it should have been double-backslash but that shouldn't matter, a normal windows path such as D:\ with be converted anyway.
You won't see an output, you would need it to write to a log so this is the equivalent to the example bash script:
Code: Select all
@echo off
set torrentid=%1
set torrentname=%2
set torrentpath=%3
@echo Torrent Details: %torrentname% %torrentpath% %torrentid% >> C:\execute_script.log
I'm sorry but nothing runs, if it does, it doesn't give me any indication or log
Now tried with "d:\\7zip_unpack_deluge.bat" and "d:\7zip_unpack_deluge.bat" and the script looks like this:
Code: Select all
rem @echo off
torrentid=$1
torrentname=$2
torrentpath=$3
echo Torrent Details: $torrentname $torrentpath $torrentid >> D:\deluge_exec.log
D:\deluge_exec.log is never created.
Please advise.
Re: Trying to run a .bat file when torrent completes
Posted: Sat Oct 18, 2014 3:17 pm
by Cas
That is not a valid batch file. You need to have the script set up exactly the same as my example and ignore anything I said previously about the slashes I already said it wasn't an issue.
Re: Trying to run a .bat file when torrent completes
Posted: Sat Oct 18, 2014 10:22 pm
by ambreswe
Cas wrote:That is not a valid batch file. You need to have the script set up exactly the same as my example and ignore anything I said previously about the slashes I already said it wasn't an issue.
Eeeh I think I know batch

What should not be valid about mine?
It doesn't like the "rem" lines?? Sounds weird.
Re: Trying to run a .bat file when torrent completes
Posted: Sat Oct 18, 2014 10:28 pm
by ambreswe
Ok I did excactly as you described.
Code: Select all
@echo off
torrentid=$1
torrentname=$2
torrentpath=$3
echo Torrent Details: $torrentname $torrentpath $torrentid >> D:\deluge_exec.log
it does absolutely nothing. no execute, no output.