I understand that I need to use
shutil.copyfile()
but I keep getting an error when actually trying to copy a file to said read-only folder. I tried turning off read-only manually at the folder but it just turns itself back on.
Error: PermissionError: [Errno 13] Permission Denied: [long folder path]
I also tried running as administrator but that did nothing.
Also note that I am using a windows 11 pc
Edit: I have also tried using os.system("attrib -r " + path)
which led to the same exact error.