I have a simple script where I want to create a file with some info once the file is completed downloading. The issue is it wont write the file and also no error occurs. If I write a folder name of a file that was downloaded previously it works but not the current folder that just downloaded.
import sys, os
folder_name = sys.argv[1]
os.chmod(folder_name, 0o444)
full_path = os.path.join(folder_name, 'myfile.nfo')
f = open(full_path, "w")
sys.exit(0)
Thanks in advance.
Post Script Cant script created file to completed folder.
-
- Newbie
- Posts: 2
- Joined: September 4th, 2018, 2:42 pm
Re: Post Script Cant script created file to completed folder.
Try to debug by adding print statements. For example of your full_path variable.
This also helps to see if the script gets called correctlty.
This also helps to see if the script gets called correctlty.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
-
- Newbie
- Posts: 2
- Joined: September 4th, 2018, 2:42 pm
Re: Post Script Cant script created file to completed folder.
Thanks I figured it out. Sab was automatically deleting the file once it was created. I eliminated the extension from the cleanup list and now it works.
Re: Post Script Cant script created file to completed folder.
Heheh, good boy Sab doing what it was told :p
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate