I would like a script in Google Sheets to move and possibly rename a file located on Google Team Drive. So far I have found out, that "move" isn't possible, it's "add the file (copy), then delete the original". But this only works on a regular Google Drive, not a Google Team Drive. What I have tried is
destinationFolder.addFile(file);
sourceFolder.removeFile(file);
but the first line gives me an error that "Team Drive doesn't support this function".