[Schd-Script] DirWatch - Multiple NZB-File Drop Support

Share your scripts or request scripts with specific features.
Forum rules
Please keep the forum clean - one topic per script. Questions not related to a specific script should be posted in Support forum.
l2g
Posts: 185
Joined: 27 Jun 2014, 22:13
Contact:

Re: [Schd-Script] DirWatch - Multiple NZB-File Drop Support

Post by l2g » 07 Mar 2017, 03:38

nzbget_fan wrote:The script is still not able to delete the .dw-files in the directory. I guess it has something to do how python accesses the windows file system. With Google's help I found this code

Code: Select all

import glob,os ; [os.remove(x) for x in glob.glob("D:\Test\*.dw")]
with which the script was able the .dw files. So I'm sure it's not because of folder or user rights (unless it has something to do with the default rights given to folders/files by windows).
If you want, just open up the script and change the references of unlink to remove (and add a from os import remove at the top) if you think it will help.
nzbget_fan wrote: But I ran in another problem where nzbget tells me after a soft start that the script is running in another session altough there's no other session of nzbget running. After stopping and starting the nzbget service the script is running, but I can't say for how long.
What is a soft start? A reload? Regardless, the script maintains a pid file and will never start a second instance if one is already detected as running. There is certainly not an issue at all here.
nzbget_fan wrote: I understand that's difficult for you to comprehend my issues without a windows test plttform. Even I'm not sure if you could comprehend the issues with a suitable test platform. With this in mind, I'm taking your idea for creating an own solution with a windows folder watch tool and a batch script. I still say thank you very much for your work, your support and the idea for the script.
I comprehend your issue quite clearly. You can run the script manually and it works, but through NZBGet it doesn't appear to have access to clean up the lingering files it's processed. I'd be interested in what the actual error message is that you get from the script; that would confirm this and make your issue much easier to debug. All that said, good luck with your own implementation; but consider the possibility that your new script could possibly only work from the command line and not through NZBGet too. If you feel like passing along more details, I'll gladly help debug more with you otherwise I completely respect your decision to move on! :)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest