i want to import public google folder/files using folder/files ID. i am not sure if it's possible.
lets say my google drive folder ID is "mydriveid" public folder id is "publicfolderid"
i want to import public folder to my folder. i tried following script but i got error
Exception: Access denied: DriveApp. copyfile @ Code.gs.6
function copyfile() {
var file = DriveApp.getFileById("File ID");
var source_folder = DriveApp.getFolderById("publicfolderid")
var dest_folder = DriveApp.getFolderById("mydriveid")
// Make a backup copy.
var file2 = file.makeCopy('BACKUP ' + Utilities.formatDate(new Date(), Session.getScriptTimeZone(), 'yyyy-MM-dd') + '.' + file.getName());
dest_folder.addFile(file2);
source_folder.removeFile(file2);
}