Post Script Cant script created file to completed folder.
Posted: September 4th, 2018, 2:50 pm
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.
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.