Skip to content

Instantly share code, notes, and snippets.

@nagarindkx
Created May 21, 2021 16:12
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nagarindkx/70f254a21c5cad7f964e762ab8b2e733 to your computer and use it in GitHub Desktop.
Move large amount of files from a single Google Drive folder to Shared Drives
function moveFilesFromDriveToShareDrive() {
/*
Created by: Kanakorn Horsiritham
Digital Innovation and Data Analytics (DIDA)
Faculty of Medicine
Prince of Songkla University
Hatyai, Songkhla
THAILAND
*/
sourceFS=DriveApp.getFolderById('GoogleDrive-Folder-ID').getFiles()
destinationFS=DriveApp.getFolderById('SharedDrives-Folder-ID')
while(sourceFS.hasNext()){
f=sourceFS.next()
f.moveTo(destinationFS)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment