Page 1 of 1

Can't get execute to work on Win10x64

Posted: Thu Sep 24, 2015 4:34 am
by miroppb
Alright, so this is driving me insane. I have Deluge installed as a daemon, along with the Deluge web UI. I set up FlexGet to provide torrents, and it all works out perfect, but I'm not able to setup a batch file to execute on Complete.

I followed the example here: http://dev.deluge-torrent.org/wiki/Plugins/Execute, and created a "ex.bat". Had it in a dir, where I wanted it to do some things for me, but deluge log kept saying "file can't be found". After some research, I moved it to \Program Files (x86)\Deluge, and in Execute had only "ex.bat", instead of the path to it: http://imgur.com/ScaHjya . Restarted the daemon. Downloaded a random torrent to test it. Checked the log, and it still said "file can't be found". After trying for about 30 minutes, I gave up. Checked the logs next day, and it showed that it actually ran ex.bat (couldn't find if it failed), but the outputted file "execute_script.log" only showed "Torrent Details: " and thats it. Nothing else. The plugins page states to do a test in cmd. Performed, and it outputted what I set as the parameters. Redownloaded the torrent. Again, nothing is in the execute_script.log. I'm at a complete loss for words...can't find a single instance of this anywhere on the forum, or anywhere else on the internet. So if anyone can please help me, I'll be forever in your debt, because this is constantly nagging at me.

Attached the log. ex.bat is initialized on line 426, then called on 3383 and 3789, but neither show as complete or failed.

Please please please help me...

Re: Can't get execute to work on Win10x64

Posted: Thu Sep 24, 2015 10:15 am
by Cas
I am not aware of any other issues with the plugins other than the bat file need to be in a location that has user permissions. e.g. Desktop path. Testing with Torrent Added is quicker.

Re: Can't get execute to work on Win10x64

Posted: Thu Sep 24, 2015 5:26 pm
by miroppb
Do I need to include quotes?

EDIT: Moved it to my Desktop. Created one to run on added and completed. Log says that its running the ex.bat, but it doesn't actually produce anything...

Code: Select all

[DEBUG   ] 19:30:45 core:127 [execute] Running commands for added
[DEBUG   ] 19:30:45 core:144 [execute] Running C:\Users\miro\Desktop\ex.bat
but nothing to indicate whether it failed or was successful.

Re: Can't get execute to work on Win10x64

Posted: Sat Apr 22, 2017 10:49 am
by tomatosmoothie
miroppb wrote:Do I need to include quotes?

EDIT: Moved it to my Desktop. Created one to run on added and completed. Log says that its running the ex.bat, but it doesn't actually produce anything...

Code: Select all

[DEBUG   ] 19:30:45 core:127 [execute] Running commands for added
[DEBUG   ] 19:30:45 core:144 [execute] Running C:\Users\miro\Desktop\ex.bat
but nothing to indicate whether it failed or was successful.
If you follow the instructions below to the t you should get a file created on your desktop based on an execute condition

Windows Batch ΒΆ

Save the code below with .bat extension such as execute_example.bat

Code: Select all

@echo off
set torrentid=%1
set torrentname=%2
set torrentpath=%3
@echo Torrent Details:  %torrentname% %torrentpath% %torrentid%  >> "%userprofile%\Desktop\execute_script.log"
The variables will show up in the log file on the user Desktop.

Did you try that?
It does not run py scripts in Windows, strangely, but you can call the py script from within a bat file.

Cheers!

Re: Can't get execute to work on Win10x64

Posted: Tue Apr 25, 2017 10:08 pm
by Covenn
I had this same problem, Could not get the execute to work to much aggravation. My bat file was located on my H: drive.

I eventually moved the bat file to C:\Users\<Your User Dir>\Documents

Re-tested and it was working.

Re: Can't get execute to work on Win10x64

Posted: Thu May 04, 2017 8:20 am
by tomatosmoothie
Yea, now I'm looking for a way to run the bat file minimized!