Hello,
I'm looking to move a large amount of folders from directory A to directory B. For this I use fileCopyV2 with a little delay between each move to avoid too_many_request and everything works fine. However, I also need to change the access rights to these folders during the transfer. I need to make sure that the inherit rights from the new parent folder disappear, and that the new rights are applied. To do this, I use multithreading so that I don't block my script. To remove the rights I start by sharing the folder, then I wait a few seconds for the folder to be shared. I retrieve his sharing_id and use it to remove all access to the folder. Then I add the new rights.
My problem is that I always get the too_many_write_opérations error. With a message asking me to wait 30 seconds. I could add delays, but I have to transfer thousands of folders, so if I add enough time I'll have to run my script for days. Outside of that, it's impossible. So I wanted to know if there is an easier way to make my project a reality. Or if optimization is possible.
Thanks in advance
Qrab