Hello everyone,
I'm currently working on a Google Apps Script project where I need to copy only the folder structure (not the files) from one Google Drive folder to another. The goal is to replicate the folder hierarchy while excluding all files within those folders.
Here is the situation:
Script Purpose: I am using Google Apps Script to copy just the folder names and structure from a source folder to a destination folder, maintaining the original hierarchy without transferring the files.
Initial Script: The initial script worked well for a small number of folders, but I recently encountered issues due to the increased volume of folders, which led to execution time limits. I then modified the script to incorporate pauses and recursion to handle a larger folder structure.
Problem: After updating the script, I'm now encountering an error where Google blocks the app, showing a message that says, “This application is blocked.” I believe the issue is related to security or authorization since I’m using ScriptApp.newTrigger() to restart the script after each pause. Here is the error message:
Troubleshooting: I tried the following:
Questions:
Thank you very much for any insights or suggestions you might have. I appreciate your expertise!
Best regards,
Otto Ontaneda