Hi,
I'm a Workspace admin on my own solo company account. I worked with an external collaborator in Google Drive. She had to leave, and some of the files in the shared Google Drive folder were owned by her. She used her personal Gmail account to create the files.
I'd like to migrate all those files to my account, but it seems I cannot do it. The funny thing is that I can click "Make a copy" on the files, but somehow I cannot set the ownership on existing files? In the UI it's not possible and in Google Scripts, I get "Exception: Invalid argument".
function transferOwnershipToMe(fileId) {
var file = DriveApp.getFileById(fileId);
var me = Session.getEffectiveUser();
file.setOwner(me);
}
Do you think I'm making some error in the script, or I just get this cryptic message for saying not enough permissions. What do you recommend me to do now? I can clone the files and delete the original, do you think I should do that? Basically recursively copy a folder and clone every item into a new one, this time owned by me?
I can also ask the collaborator to please change ownership, but I really want to figure this out. I don't want to depend on the goodwill of past collaborators in the future to solve this on my own domain.
Thanks and regards,
Zsolt