Skip to content

Instantly share code, notes, and snippets.

View abdiasriver's full-sized avatar
🏠
Working from home

abdias abdiasriver

🏠
Working from home
View GitHub Profile
@nickhargreaves
nickhargreaves / google_apps_script_copy_files_with_heirarchy_and_permissions
Last active June 10, 2023 11:53
Google Apps Script: Copy Files With Hierarchy and Permissions
function copyDriveWithPermissions(){
var originFolder = DriveApp.getFolderById("XXX-XXX");
var destinationFolder = DriveApp.getFolderById("XXX-XXX");
var currentFolder = destinationFolder;
var totalCount = traverseFolder(originFolder,0, currentFolder);
}
function traverseFolder(folder,total, currentFolder) {