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: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 codewith 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).Code: Select all
import glob,os ; [os.remove(x) for x in glob.glob("D:\Test\*.dw")]
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: 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.
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!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.