Gonzalo I couldn't find much on that error but you can try creating a new script and running the same code if it's not working.
Same issue. Let me precise my goal so maybe your script is not entirely working towards that?
How can I reference the root folder as source and move all files from there to a folder inside root except for the script itself?
So my root has the following structure:
All files except your script should be moved to the destination folder.