Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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