Copy Google Drive Folder


This is a code of Google Apps Script for copying google drive folder content to other folder.

Which situation the code resolve.

Google doesn’t allow to move folder content to other folder in the browser, which is managed by other organization according to the policy of the GSUITE organization. And, Google doesn’t allow to change the content owner to the user in other organizations.

For example, XXXXX@gmail.com can not move the folder to shared folder managed by a GSUITE organization. And, XXXXX@gmail.com can not change owner to the user in a GSUITE user.

Even in such situation, a user can read the folder content so the user can copy the content.

This script copies the folder to other folder recursively, even if the destination folder is accessible and managed by other GSUITE organization.

Why it is created.

There is a webpage to copy a folder recursively but the user in a GSUITE organization is sometimes prohibited to use the script managed by others.

How to use

Copy this script to your Google/GSUITE account and execute it.

When you copy the code, you have to update the folder IDs to yours. Folder ID appears when we opened the folders in the browsers

Code

I put this code on Gist.